bzr revid: api@openerp.com-20121115123005-0cwt6402sj1hbecm
This commit is contained in:
Arnaud Pineux 2012-11-15 13:30:05 +01:00
parent d37a79d0da
commit c196424dca
169 changed files with 2382 additions and 1571 deletions

View File

@ -541,10 +541,18 @@ class account_account(osv.osv):
return False return False
return True return True
def _check_company_account(self, cr, uid, ids, context=None):
for account in self.browse(cr, uid, ids, context=context):
if account.parent_id:
if account.company_id != account.parent_id.company_id:
return False
return True
_constraints = [ _constraints = [
(_check_recursion, 'Error!\nYou cannot create recursive accounts.', ['parent_id']), (_check_recursion, 'Error!\nYou cannot create recursive accounts.', ['parent_id']),
(_check_type, 'Configuration Error!\nYou cannot define children to an account with internal type different of "View".', ['type']), (_check_type, 'Configuration Error!\nYou cannot define children to an account with internal type different of "View".', ['type']),
(_check_account_type, 'Configuration Error!\nYou cannot select an account type with a deferral method different of "Unreconciled" for accounts with internal type "Payable/Receivable".', ['user_type','type']), (_check_account_type, 'Configuration Error!\nYou cannot select an account type with a deferral method different of "Unreconciled" for accounts with internal type "Payable/Receivable".', ['user_type','type']),
(_check_company_account, 'Error!\nYou cannot create an account which has parent account of different company.', ['parent_id']),
] ]
_sql_constraints = [ _sql_constraints = [
('code_company_uniq', 'unique (code,company_id)', 'The code of the account must be unique per company !') ('code_company_uniq', 'unique (code,company_id)', 'The code of the account must be unique per company !')

View File

@ -107,7 +107,7 @@ class account_analytic_line(osv.osv):
if journal_id: if journal_id:
journal = analytic_journal_obj.browse(cr, uid, journal_id, context=context) journal = analytic_journal_obj.browse(cr, uid, journal_id, context=context)
if journal.type == 'sale': if journal.type == 'sale':
product_price_type_ids = product_price_type_obj.search(cr, uid, [('field','=','list_price')], context) product_price_type_ids = product_price_type_obj.search(cr, uid, [('field','=','list_price')], context=context)
if product_price_type_ids: if product_price_type_ids:
pricetype = product_price_type_obj.browse(cr, uid, product_price_type_ids, context=context)[0] pricetype = product_price_type_obj.browse(cr, uid, product_price_type_ids, context=context)[0]
# Take the company currency as the reference one # Take the company currency as the reference one

View File

@ -486,6 +486,19 @@ class account_bank_statement(osv.osv):
default['move_line_ids'] = [] default['move_line_ids'] = []
return super(account_bank_statement, self).copy(cr, uid, id, default, context=context) return super(account_bank_statement, self).copy(cr, uid, id, default, context=context)
def button_journal_entries(self, cr, uid, ids, context=None):
ctx = (context or {}).copy()
ctx['journal_id'] = self.browse(cr, uid, ids[0], context=context).journal_id.id
return {
'view_type':'form',
'view_mode':'tree',
'res_model':'account.move.line',
'view_id':False,
'type':'ir.actions.act_window',
'domain':[('statement_id','in',ids)],
'context':ctx,
}
account_bank_statement() account_bank_statement()
class account_bank_statement_line(osv.osv): class account_bank_statement_line(osv.osv):

View File

@ -402,6 +402,7 @@ class account_invoice(osv.osv):
'default_res_id': ids[0], 'default_res_id': ids[0],
'default_use_template': True, 'default_use_template': True,
'default_template_id': template_id, 'default_template_id': template_id,
'default_composition_mode': 'comment',
}) })
return { return {
'view_type': 'form', 'view_type': 'form',
@ -983,13 +984,13 @@ class account_invoice(osv.osv):
for i in line: for i in line:
i[2]['period_id'] = period_id i[2]['period_id'] = period_id
ctx.update(invoice=inv)
move_id = move_obj.create(cr, uid, move, context=ctx) move_id = move_obj.create(cr, uid, move, context=ctx)
new_move_name = move_obj.browse(cr, uid, move_id, context=ctx).name new_move_name = move_obj.browse(cr, uid, move_id, context=ctx).name
# make the invoice point to that move # make the invoice point to that move
self.write(cr, uid, [inv.id], {'move_id': move_id,'period_id':period_id, 'move_name':new_move_name}, context=ctx) self.write(cr, uid, [inv.id], {'move_id': move_id,'period_id':period_id, 'move_name':new_move_name}, context=ctx)
# Pass invoice in context in method post: used if you want to get the same # Pass invoice in context in method post: used if you want to get the same
# account move reference when creating the same invoice after a cancelled one: # account move reference when creating the same invoice after a cancelled one:
ctx.update({'invoice':inv})
move_obj.post(cr, uid, [move_id], context=ctx) move_obj.post(cr, uid, [move_id], context=ctx)
self._log_event(cr, uid, ids) self._log_event(cr, uid, ids)
return True return True

View File

@ -208,7 +208,7 @@ class account_move_line(osv.osv):
if type(period_id) == str: if type(period_id) == str:
ids = period_obj.search(cr, uid, [('name', 'ilike', period_id)]) ids = period_obj.search(cr, uid, [('name', 'ilike', period_id)])
context.update({ context.update({
'period_id': ids[0] 'period_id': ids and ids[0] or False
}) })
return context return context
@ -582,7 +582,7 @@ class account_move_line(osv.osv):
lines = self.browse(cr, uid, ids, context=context) lines = self.browse(cr, uid, ids, context=context)
for l in lines: for l in lines:
if l.account_id.type == 'view': if l.account_id.type == 'view':
raise osv.except_osv(_('Error!'), _('You cannot create journal items on “View” type account %s %s.') % (l.account_id.code, l.account_id.name)) return False
return True return True
def _check_no_closed(self, cr, uid, ids, context=None): def _check_no_closed(self, cr, uid, ids, context=None):
@ -917,7 +917,7 @@ class account_move_line(osv.osv):
if lines and lines[0]: if lines and lines[0]:
partner_id = lines[0].partner_id and lines[0].partner_id.id or False partner_id = lines[0].partner_id and lines[0].partner_id.id or False
if not partner_obj.has_something_to_reconcile(cr, uid, partner_id, context=context): if partner_id and not partner_obj.has_something_to_reconcile(cr, uid, partner_id, context=context):
partner_obj.mark_as_reconciled(cr, uid, [partner_id], context=context) partner_obj.mark_as_reconciled(cr, uid, [partner_id], context=context)
return r_id return r_id
@ -975,7 +975,7 @@ class account_move_line(osv.osv):
if context is None: if context is None:
context = {} context = {}
result = super(account_move_line, self).fields_view_get(cr, uid, view_id, view_type, context=context, toolbar=toolbar, submenu=submenu) result = super(account_move_line, self).fields_view_get(cr, uid, view_id, view_type, context=context, toolbar=toolbar, submenu=submenu)
if view_type != 'tree': if (view_type != 'tree') or view_id:
#Remove the toolbar from the form view #Remove the toolbar from the form view
if view_type == 'form': if view_type == 'form':
if result.get('toolbar', False): if result.get('toolbar', False):

View File

@ -41,13 +41,5 @@
groups="group_account_user,group_account_manager" groups="group_account_user,group_account_manager"
parent="account.menu_finance_generic_reporting" sequence="3"/> parent="account.menu_finance_generic_reporting" sequence="3"/>
<report id="account_account_balance_landscape"
string="Account balance"
model="account.account"
name="account.account.balance.landscape"
rml="account/report/account_balance_landscape.rml"
auto="False"
menu="False"/>
</data> </data>
</openerp> </openerp>

View File

@ -302,11 +302,11 @@
<field name="domain">[('parent_id','=',False)]</field> <field name="domain">[('parent_id','=',False)]</field>
</record> </record>
<record id="view_account_gain_loss_tree" model="ir.ui.view"> <record id="view_account_gain_loss_tree" model="ir.ui.view">
<field name="name">Unrealized Gain or Loss</field> <field name="name">Unrealized Gain or Loss</field>
<field name="model">account.account</field> <field name="model">account.account</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<tree string="Unrealized Gains and losses"> <tree string="Unrealized Gains and losses" create="false">
<field name="code"/> <field name="code"/>
<field name="name"/> <field name="name"/>
<field name="parent_id" invisible="1"/> <field name="parent_id" invisible="1"/>
@ -322,7 +322,7 @@
</field> </field>
</record> </record>
<record id="action_account_gain_loss" model="ir.actions.act_window"> <record id="action_account_gain_loss" model="ir.actions.act_window">
<field name="name">Unrealized Gain or Loss</field> <field name="name">Unrealized Gain or Loss</field>
<field name="res_model">account.account</field> <field name="res_model">account.account</field>
<field name="view_type">form</field> <field name="view_type">form</field>
@ -650,7 +650,7 @@
<field name="ref"/> <field name="ref"/>
<field name="partner_id" on_change="onchange_partner_id(partner_id)"/> <field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
<field name="type" on_change="onchange_type(partner_id, type)"/> <field name="type" on_change="onchange_type(partner_id, type)"/>
<field domain="[('journal_id','=',parent.journal_id), ('company_id', '=', parent.company_id)]" name="account_id"/> <field name="account_id" options='{"no_open":True}' domain="[('journal_id','=',parent.journal_id), ('company_id', '=', parent.company_id)]"/>
<field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('company_id', '=', parent.company_id), ('type', '&lt;&gt;', 'view')]"/> <field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('company_id', '=', parent.company_id), ('type', '&lt;&gt;', 'view')]"/>
<field name="amount"/> <field name="amount"/>
</tree> </tree>
@ -661,7 +661,7 @@
<field name="ref"/> <field name="ref"/>
<field name="partner_id" on_change="onchange_partner_id(partner_id)"/> <field name="partner_id" on_change="onchange_partner_id(partner_id)"/>
<field name="type" on_change="onchange_type(partner_id, type)"/> <field name="type" on_change="onchange_type(partner_id, type)"/>
<field domain="[('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view'), ('company_id', '=', parent.company_id)]" name="account_id"/> <field name="account_id" domain="[('journal_id', '=', parent.journal_id), ('type', '&lt;&gt;', 'view'), ('company_id', '=', parent.company_id)]"/>
<field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('company_id', '=', parent.company_id), ('type', '&lt;&gt;', 'view')]"/> <field name="analytic_account_id" groups="analytic.group_analytic_accounting" domain="[('company_id', '=', parent.company_id), ('type', '&lt;&gt;', 'view')]"/>
<field name="amount"/> <field name="amount"/>
<field name="sequence" readonly="0"/> <field name="sequence" readonly="0"/>
@ -671,15 +671,24 @@
</form> </form>
</field> </field>
</page> </page>
<page string="Journal Entries" name="move_live_ids">
<field name="move_line_ids"/>
</page>
</notebook> </notebook>
</sheet> </sheet>
</form> </form>
</field> </field>
</record> </record>
<record id="view_bank_statement_form_journal_items" model="ir.ui.view">
<field name="name">account.bank.statement.journal.items.form.inherit</field>
<field name="model">account.bank.statement</field>
<field name="inherit_id" ref="view_bank_statement_form"/>
<field name="arch" type="xml">
<xpath expr="//div[@name='import_buttons']" position="inside">
<button name="button_journal_entries"
string="Journal Items" type="object"
attrs="{'invisible':[('state','!=','confirm')]}"/>
</xpath>
</field>
</record>
<record id="action_bank_statement_tree" model="ir.actions.act_window"> <record id="action_bank_statement_tree" model="ir.actions.act_window">
<field name="name">Bank Statements</field> <field name="name">Bank Statements</field>
@ -1055,7 +1064,7 @@
</field> </field>
</record> </record>
<record id="view_move_line_tree" model="ir.ui.view"> <record id="view_move_line_tree" model="ir.ui.view">
<field name="name">account.move.line.tree</field> <field name="name">account.move.line.tree</field>
<field name="model">account.move.line</field> <field name="model">account.move.line</field>
<field eval="4" name="priority"/> <field eval="4" name="priority"/>
@ -1791,7 +1800,7 @@
<field name="name"/> <field name="name"/>
<field name="active"/> <field name="active"/>
</group> </group>
<field name="note" placeholder="Note fo the invoice..."/> <field name="note" placeholder="Note for the invoice..."/>
<separator string="Computation"/> <separator string="Computation"/>
<field name="line_ids"/> <field name="line_ids"/>
</form> </form>
@ -1850,7 +1859,7 @@
</field> </field>
</record> </record>
<record id="view_subscription_search" model="ir.ui.view"> <record id="view_subscription_search" model="ir.ui.view">
<field name="name">account.subscription.search</field> <field name="name">account.subscription.search</field>
<field name="model">account.subscription</field> <field name="model">account.subscription</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
@ -2159,7 +2168,8 @@
<field name="visible" /> <field name="visible" />
<field name="complete_tax_set" /> <field name="complete_tax_set" />
</group> </group>
<field name="tax_template_ids" colspan="4" readonly="1" nolabel="1"/> <separator string="Default Taxes" colspan="4"/>
<field name="tax_template_ids" colspan="4" nolabel="1"/>
<separator string="Properties" colspan="4"/> <separator string="Properties" colspan="4"/>
<group col="4"> <group col="4">
<field name="property_account_receivable" domain="[('id', 'child_of', [account_root_id])]"/> <field name="property_account_receivable" domain="[('id', 'child_of', [account_root_id])]"/>

View File

@ -40,7 +40,7 @@
<field name="name">Automated Invoice Notification Mail</field> <field name="name">Automated Invoice Notification Mail</field>
<field name="email_from">${object.user_id.email or object.company_id.email or 'noreply@localhost'}</field> <field name="email_from">${object.user_id.email or object.company_id.email or 'noreply@localhost'}</field>
<field name="subject">${object.company_id.name} Invoice (Ref ${object.number or 'n/a' })</field> <field name="subject">${object.company_id.name} Invoice (Ref ${object.number or 'n/a' })</field>
<field name="email_to">${object.partner_id.email or ''}</field> <field name="email_recipients">${object.partner_id.id}</field>
<field name="model_id" ref="account.model_account_invoice"/> <field name="model_id" ref="account.model_account_invoice"/>
<field name="auto_delete" eval="True"/> <field name="auto_delete" eval="True"/>
<field name="body_html"><![CDATA[ <field name="body_html"><![CDATA[

View File

@ -6,7 +6,7 @@
<field name="name">account.fiscal.position.form</field> <field name="name">account.fiscal.position.form</field>
<field name="model">account.fiscal.position</field> <field name="model">account.fiscal.position</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Fiscal Position"> <form string="Fiscal Position" version="7.0">
<group col="4"> <group col="4">
<field name="name"/> <field name="name"/>
<field name="active"/> <field name="active"/>
@ -114,7 +114,7 @@
context="{'search_default_partner_id':[active_id], 'default_partner_id': active_id}" context="{'search_default_partner_id':[active_id], 'default_partner_id': active_id}"
src_model="res.partner" src_model="res.partner"
view_type="form" view_type="form"
view_mode="tree,form,calendar"/> view_mode="tree,form"/>
</data> </data>
</openerp> </openerp>

View File

@ -170,12 +170,12 @@
<tr> <tr>
<td><para style="terp_tblheader_General_Centre">Chart of Accounts</para></td> <td><para style="terp_tblheader_General_Centre">Chart of Accounts</para></td>
<td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td> <td><para style="terp_tblheader_General_Centre">Fiscal Year</para></td>
<td><para style="terp_tblheader_General_Centre">Filter By [[ get_filter(data)!='No Filter' and get_filter(data) ]]</para></td> <td><para style="terp_tblheader_General_Centre">Filter By [[ get_filter(data)!='No Filters' and get_filter(data) ]]</para></td>
</tr> </tr>
<tr> <tr>
<td><para style="terp_default_Centre_8">[[ get_account(data) or removeParentNode('para') ]]</para></td> <td><para style="terp_default_Centre_8">[[ get_account(data) or removeParentNode('para') ]]</para></td>
<td><para style="terp_default_Centre_8">[[ get_fiscalyear(data) or '' ]]</para></td> <td><para style="terp_default_Centre_8">[[ get_fiscalyear(data) or '' ]]</para></td>
<td><para style="terp_default_Centre_8">[[ get_filter(data)=='No Filter' and get_filter(data) or removeParentNode('para') ]] </para> <td><para style="terp_default_Centre_8">[[ get_filter(data)=='No Filters' and get_filter(data) or removeParentNode('para') ]] </para>
<blockTable colWidths="60.0,60.0" style="Table3">[[ get_filter(data)=='Date' or removeParentNode('blockTable') ]] <blockTable colWidths="60.0,60.0" style="Table3">[[ get_filter(data)=='Date' or removeParentNode('blockTable') ]]
<tr> <tr>
<td><para style="terp_tblheader_General_Centre">Start Date</para></td> <td><para style="terp_tblheader_General_Centre">Start Date</para></td>

View File

@ -299,10 +299,10 @@ class general_ledger(report_sxw.rml_parse, common_report_header):
def _get_sortby(self, data): def _get_sortby(self, data):
if self.sortby == 'sort_date': if self.sortby == 'sort_date':
return 'Date' return self._translate('Date')
elif self.sortby == 'sort_journal_partner': elif self.sortby == 'sort_journal_partner':
return 'Journal & Partner' return self._translate('Journal & Partner')
return 'Date' return self._translate('Date')
report_sxw.report_sxw('report.account.general.ledger', 'account.account', 'addons/account/report/account_general_ledger.rml', parser=general_ledger, header='internal') report_sxw.report_sxw('report.account.general.ledger', 'account.account', 'addons/account/report/account_general_ledger.rml', parser=general_ledger, header='internal')
report_sxw.report_sxw('report.account.general.ledger_landscape', 'account.account', 'addons/account/report/account_general_ledger_landscape.rml', parser=general_ledger, header='internal landscape') report_sxw.report_sxw('report.account.general.ledger_landscape', 'account.account', 'addons/account/report/account_general_ledger_landscape.rml', parser=general_ledger, header='internal landscape')

View File

@ -94,10 +94,10 @@ class common_report_header(object):
def _get_filter(self, data): def _get_filter(self, data):
if data.get('form', False) and data['form'].get('filter', False): if data.get('form', False) and data['form'].get('filter', False):
if data['form']['filter'] == 'filter_date': if data['form']['filter'] == 'filter_date':
return 'Date' return self._translate('Date')
elif data['form']['filter'] == 'filter_period': elif data['form']['filter'] == 'filter_period':
return 'Periods' return self._translate('Periods')
return 'No Filter' return self._translate('No Filters')
def _sum_debit_period(self, period_id, journal_id=None): def _sum_debit_period(self, period_id, journal_id=None):
journals = journal_id or self.journal_ids journals = journal_id or self.journal_ids

View File

@ -48,7 +48,7 @@ openerp.account = function (instance) {
this.last_group_by = group_by; this.last_group_by = group_by;
this.old_search = _.bind(this._super, this); this.old_search = _.bind(this._super, this);
var mod = new instance.web.Model("account.move.line", context, domain); var mod = new instance.web.Model("account.move.line", context, domain);
return mod.call("list_partners_to_reconcile", []).pipe(function(result) { return mod.call("list_partners_to_reconcile", []).then(function(result) {
var current = self.current_partner !== null ? self.partners[self.current_partner][0] : null; var current = self.current_partner !== null ? self.partners[self.current_partner][0] : null;
self.partners = result; self.partners = result;
var index = _.find(_.range(self.partners.length), function(el) { var index = _.find(_.range(self.partners.length), function(el) {
@ -74,7 +74,7 @@ openerp.account = function (instance) {
return fct(); return fct();
} else { } else {
return new instance.web.Model("res.partner").call("read", return new instance.web.Model("res.partner").call("read",
[self.partners[self.current_partner][0], ["last_reconciliation_date"]]).pipe(function(res) { [self.partners[self.current_partner][0], ["last_reconciliation_date"]]).then(function(res) {
self.last_reconciliation_date = self.last_reconciliation_date =
instance.web.format_value(res.last_reconciliation_date, {"type": "datetime"}, _t("Never")); instance.web.format_value(res.last_reconciliation_date, {"type": "datetime"}, _t("Never"));
return fct(); return fct();
@ -92,7 +92,7 @@ openerp.account = function (instance) {
return false; return false;
} }
new instance.web.Model("ir.model.data").call("get_object_reference", ["account", "action_view_account_move_line_reconcile"]).pipe(function(result) { new instance.web.Model("ir.model.data").call("get_object_reference", ["account", "action_view_account_move_line_reconcile"]).then(function(result) {
var additional_context = _.extend({ var additional_context = _.extend({
active_id: ids[0], active_id: ids[0],
active_ids: ids, active_ids: ids,
@ -101,7 +101,7 @@ openerp.account = function (instance) {
return self.rpc("/web/action/load", { return self.rpc("/web/action/load", {
action_id: result[1], action_id: result[1],
context: additional_context context: additional_context
}).then(function (result) { }).done(function (result) {
result.context = _.extend(result.context || {}, additional_context); result.context = _.extend(result.context || {}, additional_context);
result.flags = result.flags || {}; result.flags = result.flags || {};
result.flags.new_window = true; result.flags.new_window = true;
@ -116,7 +116,7 @@ openerp.account = function (instance) {
mark_as_reconciled: function() { mark_as_reconciled: function() {
var self = this; var self = this;
var id = self.partners[self.current_partner][0]; var id = self.partners[self.current_partner][0];
new instance.web.Model("res.partner").call("mark_as_reconciled", [[id]]).pipe(function() { new instance.web.Model("res.partner").call("mark_as_reconciled", [[id]]).then(function() {
self.do_search(self.last_domain, self.last_context, self.last_group_by); self.do_search(self.last_domain, self.last_context, self.last_group_by);
}); });
}, },

View File

@ -31,7 +31,6 @@
- -
!python {model: account.account}: | !python {model: account.account}: |
ctx={} ctx={}
ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')],'active_id':ref('account.chart0')})
data_dict = {'chart_account_id':ref('account.chart0')} data_dict = {'chart_account_id':ref('account.chart0')}
from tools import test_reports from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_aged_balance_view',wiz_data=data_dict, context=ctx, our_module='account') test_reports.try_report_action(cr, uid, 'action_account_aged_balance_view',wiz_data=data_dict, context=ctx, our_module='account')
@ -40,7 +39,6 @@
- -
!python {model: account.account}: | !python {model: account.account}: |
ctx={} ctx={}
ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')]})
data_dict = {'chart_account_id':ref('account.chart0'), 'account_report_id': ref('account_financial_report_balancesheet0')} data_dict = {'chart_account_id':ref('account.chart0'), 'account_report_id': ref('account_financial_report_balancesheet0')}
from tools import test_reports from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_report',wiz_data=data_dict, context=ctx, our_module='account') test_reports.try_report_action(cr, uid, 'action_account_report',wiz_data=data_dict, context=ctx, our_module='account')
@ -49,7 +47,6 @@
- -
!python {model: account.account}: | !python {model: account.account}: |
ctx={} ctx={}
ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')]})
data_dict = {'chart_account_id':ref('account.chart0')} data_dict = {'chart_account_id':ref('account.chart0')}
from tools import test_reports from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_balance_menu',wiz_data=data_dict, context=ctx, our_module='account') test_reports.try_report_action(cr, uid, 'action_account_balance_menu',wiz_data=data_dict, context=ctx, our_module='account')
@ -60,7 +57,6 @@
journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'), journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),
ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')] ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')]
ctx={} ctx={}
ctx.update({'model': 'account.journal.period','active_ids':journal_ids})
data_dict = {'chart_account_id':ref('account.chart0')} data_dict = {'chart_account_id':ref('account.chart0')}
from tools import test_reports from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_central_journal',wiz_data=data_dict, context=ctx, our_module='account') test_reports.try_report_action(cr, uid, 'action_account_central_journal',wiz_data=data_dict, context=ctx, our_module='account')
@ -71,7 +67,6 @@
journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'), journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),
ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')] ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')]
ctx={} ctx={}
ctx.update({'model': 'account.journal.period','active_ids':journal_ids})
data_dict = {'chart_account_id':ref('account.chart0')} data_dict = {'chart_account_id':ref('account.chart0')}
from tools import test_reports from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_general_journal',wiz_data=data_dict, context=ctx, our_module='account') test_reports.try_report_action(cr, uid, 'action_account_general_journal',wiz_data=data_dict, context=ctx, our_module='account')
@ -80,7 +75,6 @@
- -
!python {model: account.account}: | !python {model: account.account}: |
ctx={} ctx={}
ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')]})
data_dict = {'chart_account_id':ref('account.chart0'),'landscape':False} data_dict = {'chart_account_id':ref('account.chart0'),'landscape':False}
from tools import test_reports from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_general_ledger_menu',wiz_data=data_dict, context=ctx, our_module='account') test_reports.try_report_action(cr, uid, 'action_account_general_ledger_menu',wiz_data=data_dict, context=ctx, our_module='account')
@ -89,7 +83,6 @@
- -
!python {model: account.account}: | !python {model: account.account}: |
ctx={} ctx={}
ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')]})
data_dict = {'chart_account_id':ref('account.chart0'),'landscape':True} data_dict = {'chart_account_id':ref('account.chart0'),'landscape':True}
from tools import test_reports from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_general_ledger_menu',wiz_data=data_dict, context=ctx, our_module='account') test_reports.try_report_action(cr, uid, 'action_account_general_ledger_menu',wiz_data=data_dict, context=ctx, our_module='account')
@ -99,7 +92,6 @@
!python {model: account.journal.period}: | !python {model: account.journal.period}: |
journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')] journal_ids = [ref('account.sales_journal'),ref('account.refund_sales_journal'),ref('account.expenses_journal'),ref('account.refund_expenses_journal'),ref('account.bank_journal'),ref('account.check_journal'),ref('account.cash_journal')]
ctx={} ctx={}
ctx.update({'model': 'account.journal.period','active_ids':journal_ids})
data_dict = {'chart_account_id':ref('account.chart0'), 'period_from':ref('period_1'), 'period_to':ref('period_12')} data_dict = {'chart_account_id':ref('account.chart0'), 'period_from':ref('period_1'), 'period_to':ref('period_12')}
from tools import test_reports from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_print_journal',wiz_data=data_dict, context=ctx, our_module='account') test_reports.try_report_action(cr, uid, 'action_account_print_journal',wiz_data=data_dict, context=ctx, our_module='account')
@ -109,7 +101,6 @@
!python {model: account.account}: | !python {model: account.account}: |
ctx={} ctx={}
data_dict = {'chart_account_id':ref('account.chart0')} data_dict = {'chart_account_id':ref('account.chart0')}
ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')],'active_id':ref('account.chart0')})
from tools import test_reports from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_partner_balance',wiz_data=data_dict, context=ctx, our_module='account') test_reports.try_report_action(cr, uid, 'action_account_partner_balance',wiz_data=data_dict, context=ctx, our_module='account')
- -
@ -118,7 +109,6 @@
!python {model: account.account}: | !python {model: account.account}: |
ctx={} ctx={}
data_dict = {'chart_account_id':ref('account.chart0'),'page_split': True} data_dict = {'chart_account_id':ref('account.chart0'),'page_split': True}
ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')],'active_id':ref('account.chart0')})
from tools import test_reports from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_partner_ledger',wiz_data=data_dict, context=ctx, our_module='account') test_reports.try_report_action(cr, uid, 'action_account_partner_ledger',wiz_data=data_dict, context=ctx, our_module='account')
- -
@ -127,7 +117,6 @@
!python {model: res.partner}: | !python {model: res.partner}: |
ctx={} ctx={}
data_dict = {'chart_account_id':ref('account.chart0'),'page_split': False} data_dict = {'chart_account_id':ref('account.chart0'),'page_split': False}
ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')],'active_id':ref('account.chart0')})
from tools import test_reports from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_partner_ledger',wiz_data=data_dict, context=ctx, our_module='account') test_reports.try_report_action(cr, uid, 'action_account_partner_ledger',wiz_data=data_dict, context=ctx, our_module='account')
- -
@ -135,7 +124,6 @@
- -
!python {model: account.account}: | !python {model: account.account}: |
ctx={} ctx={}
ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')]})
data_dict = {'chart_account_id':ref('account.chart0'), 'target_move': 'all', 'account_report_id': ref('account_financial_report_balancesheet0')} data_dict = {'chart_account_id':ref('account.chart0'), 'target_move': 'all', 'account_report_id': ref('account_financial_report_balancesheet0')}
from tools import test_reports from tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_report',wiz_data=data_dict, context=ctx, our_module='account') test_reports.try_report_action(cr, uid, 'action_account_report',wiz_data=data_dict, context=ctx, our_module='account')

View File

@ -226,7 +226,7 @@ class account_fiscalyear_close(osv.osv_memory):
for account in obj_acc_account.browse(cr, uid, account_ids, context={'fiscalyear': fy_id}): for account in obj_acc_account.browse(cr, uid, account_ids, context={'fiscalyear': fy_id}):
balance_in_currency = 0.0 balance_in_currency = 0.0
if account.currency_id: if account.currency_id:
cr.execute('SELECT sum(amount_currency) as balance_in_currency FROM account_move_line ' \ cr.execute('SELECT sum(COALESCE(amount_currency,0.0)) as balance_in_currency FROM account_move_line ' \
'WHERE account_id = %s ' \ 'WHERE account_id = %s ' \
'AND ' + query_line + ' ' \ 'AND ' + query_line + ' ' \
'AND currency_id = %s', (account.id, account.currency_id.id)) 'AND currency_id = %s', (account.id, account.currency_id.id))

View File

@ -119,7 +119,11 @@ class account_common_report(osv.osv_memory):
def _get_fiscalyear(self, cr, uid, context=None): def _get_fiscalyear(self, cr, uid, context=None):
now = time.strftime('%Y-%m-%d') now = time.strftime('%Y-%m-%d')
fiscalyears = self.pool.get('account.fiscalyear').search(cr, uid, [('date_start', '<', now), ('date_stop', '>', now)], limit=1 ) company_id = False
ids = context.get('active_ids', [])
if ids:
company_id = self.browse(cr, uid, ids[0], context=context).company_id.id
fiscalyears = self.pool.get('account.fiscalyear').search(cr, uid, [('date_start', '<', now), ('date_stop', '>', now), ('company_id', '=', company_id)], limit=1)
return fiscalyears and fiscalyears[0] or False return fiscalyears and fiscalyears[0] or False
def _get_all_journal(self, cr, uid, context=None): def _get_all_journal(self, cr, uid, context=None):

View File

@ -21,17 +21,17 @@
<field name="inherit_id" ref="account.view_move_form"/> <field name="inherit_id" ref="account.view_move_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="/form/sheet/notebook/page/field[@name='line_id']/tree/field[@name='analytic_account_id']" position="replace"> <xpath expr="/form/sheet/notebook/page/field[@name='line_id']/tree/field[@name='analytic_account_id']" position="replace">
<field name="analytics_id" context="{'journal_id':journal_id}" groups="analytic.group_analytic_accounting"/> <field name="analytics_id" context="{'journal_id':parent.journal_id}" groups="analytic.group_analytic_accounting"/>
</xpath> </xpath>
<xpath expr="/form/sheet/notebook/page/field[@name='line_id']/form/notebook/page/group/group/field[@name='analytic_account_id']" position="replace"> <xpath expr="/form/sheet/notebook/page/field[@name='line_id']/form/notebook/page/group/group/field[@name='analytic_account_id']" position="replace">
<field name="analytics_id" context="{'journal_id':journal_id}" groups="analytic.group_analytic_accounting"/> <field name="analytics_id" context="{'journal_id':parent.journal_id}" groups="analytic.group_analytic_accounting"/>
</xpath> </xpath>
</field> </field>
</record> </record>
<record id="journal_col11" model="account.journal.column"> <record id="journal_col11" model="account.journal.column">
<field eval="&quot;&quot;&quot;Analytic Distribution&quot;&quot;&quot;" name="name"/> <field eval="&quot;&quot;&quot;Analytic Distribution&quot;&quot;&quot;" name="name"/>
<field eval="11" name="sequence"/> <field eval="15" name="sequence"/>
<field name="view_id" ref="account.account_journal_view"/> <field name="view_id" ref="account.account_journal_view"/>
<field eval="0" name="required"/> <field eval="0" name="required"/>
<field eval="&quot;&quot;&quot;analytics_id&quot;&quot;&quot;" name="field"/> <field eval="&quot;&quot;&quot;analytics_id&quot;&quot;&quot;" name="field"/>
@ -276,7 +276,7 @@
</field> </field>
</field> </field>
</record> </record>
<record model="ir.ui.view" id="view_default_inherit_tree"> <record model="ir.ui.view" id="view_default_inherit_tree">
<field name="name">account.analytic.default.tree.plans</field> <field name="name">account.analytic.default.tree.plans</field>
<field name="model">account.analytic.default</field> <field name="model">account.analytic.default</field>
<field name="inherit_id" ref="account_analytic_default.view_account_analytic_default_tree"/> <field name="inherit_id" ref="account_analytic_default.view_account_analytic_default_tree"/>

View File

@ -40,7 +40,7 @@ class account_invoice_line(osv.osv):
if inv.type in ('out_invoice','out_refund'): if inv.type in ('out_invoice','out_refund'):
for i_line in inv.invoice_line: for i_line in inv.invoice_line:
if i_line.product_id: if i_line.product_id and i_line.product_id.valuation == 'real_time':
if inv.type == 'out_invoice': if inv.type == 'out_invoice':
# debit account dacc will be the output account # debit account dacc will be the output account
# first check the product, if empty check the category # first check the product, if empty check the category
@ -87,7 +87,7 @@ class account_invoice_line(osv.osv):
}) })
elif inv.type in ('in_invoice','in_refund'): elif inv.type in ('in_invoice','in_refund'):
for i_line in inv.invoice_line: for i_line in inv.invoice_line:
if i_line.product_id: if i_line.product_id and i_line.product_id.valuation == 'real_time':
if i_line.product_id.type != 'service': if i_line.product_id.type != 'service':
# get the price difference account at the product # get the price difference account at the product
acc = i_line.product_id.property_account_creditor_price_difference and i_line.product_id.property_account_creditor_price_difference.id acc = i_line.product_id.property_account_creditor_price_difference and i_line.product_id.property_account_creditor_price_difference.id

View File

@ -386,7 +386,7 @@ class account_asset_depreciation_line(osv.osv):
current_currency = line.asset_id.currency_id.id current_currency = line.asset_id.currency_id.id
context.update({'date': depreciation_date}) context.update({'date': depreciation_date})
amount = currency_obj.compute(cr, uid, current_currency, company_currency, line.amount, context=context) amount = currency_obj.compute(cr, uid, current_currency, company_currency, line.amount, context=context)
sign = line.asset_id.category_id.journal_id.type = 'purchase' and 1 or -1 sign = (line.asset_id.category_id.journal_id.type == 'purchase' and 1) or -1
asset_name = line.asset_id.name asset_name = line.asset_id.name
reference = line.name reference = line.name
move_vals = { move_vals = {

View File

@ -220,7 +220,18 @@
<menuitem parent="next_id_31" <menuitem parent="next_id_31"
id="menu_act_crossovered_budget_view" id="menu_act_crossovered_budget_view"
action="act_crossovered_budget_view" sequence="1" /> action="act_crossovered_budget_view" sequence="1" />
<record id="view_crossovered_budget_line_search" model="ir.ui.view">
<field name="name">account.budget.line.search</field>
<field name="model">crossovered.budget.lines</field>
<field name="type">search</field>
<field name="arch" type="xml">
<search string="Budget Lines">
<field name="analytic_account_id"/>
</search>
</field>
</record>
<record model="ir.ui.view" id="view_crossovered_budget_line_tree"> <record model="ir.ui.view" id="view_crossovered_budget_line_tree">
<field name="name">crossovered.budget.line.tree</field> <field name="name">crossovered.budget.line.tree</field>
<field name="model">crossovered.budget.lines</field> <field name="model">crossovered.budget.lines</field>

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openobject-addons\n" "Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-02-08 00:35+0000\n" "POT-Creation-Date: 2012-02-08 00:35+0000\n"
"PO-Revision-Date: 2012-02-09 19:28+0000\n" "PO-Revision-Date: 2012-11-09 12:09+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: Pedro Manuel Baeza <pedro.baeza@gmail.com>\n"
"Language-Team: Spanish <es@li.org>\n" "Language-Team: Spanish <es@li.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-30 05:36+0000\n" "X-Launchpad-Export-Date: 2012-11-10 04:59+0000\n"
"X-Generator: Launchpad (build 16206)\n" "X-Generator: Launchpad (build 16251)\n"
#. module: account_check_writing #. module: account_check_writing
#: selection:res.company,check_layout:0 #: selection:res.company,check_layout:0
@ -154,7 +154,7 @@ msgstr "Compañías"
#. module: account_check_writing #. module: account_check_writing
#: view:res.company:0 #: view:res.company:0
msgid "Default Check Layout" msgid "Default Check Layout"
msgstr "" msgstr "Comprobar formato por defecto"
#. module: account_check_writing #. module: account_check_writing
#: constraint:account.journal:0 #: constraint:account.journal:0

View File

@ -43,6 +43,18 @@
<field eval="True" name="required"/> <field eval="True" name="required"/>
<field eval="2" name="sequence"/> <field eval="2" name="sequence"/>
</record> </record>
<record id="sequence_journal" model="ir.sequence.type">
<field name="name">Account Journal</field>
<field name="code">account.journal</field>
</record>
<record id="sequence_journal_seq" model="ir.sequence">
<field name="name">Account journal sequence</field>
<field name="code">account.journal</field>
<field name="prefix">AJ</field>
<field eval="1" name="number_next"/>
<field eval="1" name="number_increment"/>
</record>
</data> </data>
</openerp> </openerp>

View File

@ -267,6 +267,7 @@ class account_voucher(osv.osv):
_order = "date desc, id desc" _order = "date desc, id desc"
# _rec_name = 'number' # _rec_name = 'number'
_columns = { _columns = {
'active': fields.boolean('Active', help="By default, reconciliation vouchers made on draft bank statements are set as inactive, which allow to hide the customer/supplier payment while the bank statement isn't confirmed."),
'type':fields.selection([ 'type':fields.selection([
('sale','Sale'), ('sale','Sale'),
('purchase','Purchase'), ('purchase','Purchase'),
@ -328,6 +329,7 @@ class account_voucher(osv.osv):
'is_multi_currency': fields.boolean('Multi Currency Voucher', help='Fields with internal purpose only that depicts if the voucher is a multi currency one or not'), 'is_multi_currency': fields.boolean('Multi Currency Voucher', help='Fields with internal purpose only that depicts if the voucher is a multi currency one or not'),
} }
_defaults = { _defaults = {
'active': True,
'period_id': _get_period, 'period_id': _get_period,
'partner_id': _get_partner, 'partner_id': _get_partner,
'journal_id':_get_journal, 'journal_id':_get_journal,
@ -953,6 +955,9 @@ class account_voucher(osv.osv):
if voucher_brw.number: if voucher_brw.number:
name = voucher_brw.number name = voucher_brw.number
elif voucher_brw.journal_id.sequence_id: elif voucher_brw.journal_id.sequence_id:
if not voucher_brw.journal_id.sequence_id.active:
raise osv.except_osv(_('Configuration Error !'),
_('Please activate the sequence of selected journal !'))
name = seq_obj.next_by_id(cr, uid, voucher_brw.journal_id.sequence_id.id, context=context) name = seq_obj.next_by_id(cr, uid, voucher_brw.journal_id.sequence_id.id, context=context)
else: else:
raise osv.except_osv(_('Error!'), raise osv.except_osv(_('Error!'),
@ -1504,6 +1509,15 @@ account_voucher_line()
class account_bank_statement(osv.osv): class account_bank_statement(osv.osv):
_inherit = 'account.bank.statement' _inherit = 'account.bank.statement'
def button_confirm_bank(self, cr, uid, ids, context=None):
voucher_obj = self.pool.get('account.voucher')
voucher_ids = []
for statement in self.browse(cr, uid, ids, context=context):
voucher_ids += [line.voucher_id.id for line in statement.line_ids if line.voucher_id]
if voucher_ids:
voucher_obj.write(cr, uid, voucher_ids, {'active': True}, context=context)
return super(account_bank_statement, self).button_confirm_bank(cr, uid, ids, context=context)
def button_cancel(self, cr, uid, ids, context=None): def button_cancel(self, cr, uid, ids, context=None):
voucher_obj = self.pool.get('account.voucher') voucher_obj = self.pool.get('account.voucher')
for st in self.browse(cr, uid, ids, context=context): for st in self.browse(cr, uid, ids, context=context):
@ -1539,6 +1553,16 @@ account_bank_statement()
class account_bank_statement_line(osv.osv): class account_bank_statement_line(osv.osv):
_inherit = 'account.bank.statement.line' _inherit = 'account.bank.statement.line'
def onchange_partner_id(self, cr, uid, ids, partner_id, context=None):
res = super(account_bank_statement_line, self).onchange_partner_id(cr, uid, ids, partner_id, context=context)
if 'value' not in res:
res['value'] = {}
res['value'].update({'voucher_id' : False})
return res
def onchange_amount(self, cr, uid, ids, amount, context=None):
return {'value' : {'voucher_id' : False}}
def _amount_reconciled(self, cursor, user, ids, name, args, context=None): def _amount_reconciled(self, cursor, user, ids, name, args, context=None):
if not ids: if not ids:
return {} return {}
@ -1565,7 +1589,7 @@ class account_bank_statement_line(osv.osv):
_columns = { _columns = {
'amount_reconciled': fields.function(_amount_reconciled, 'amount_reconciled': fields.function(_amount_reconciled,
string='Amount reconciled', type='float'), string='Amount reconciled', type='float'),
'voucher_id': fields.many2one('account.voucher', 'Payment'), 'voucher_id': fields.many2one('account.voucher', 'Reconciliation'),
} }
def unlink(self, cr, uid, ids, context=None): def unlink(self, cr, uid, ids, context=None):

View File

@ -200,33 +200,29 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="//div[@name='import_buttons']" position="inside"> <xpath expr="//div[@name='import_buttons']" position="inside">
<button name="%(action_view_account_statement_from_invoice_lines)d" <button name="%(action_view_account_statement_from_invoice_lines)d"
string="Import Invoices" type="action" icon="gtk-execute" string="Import Invoices" type="action"
attrs="{'invisible':[('state','=','confirm')]}"/> attrs="{'invisible':[('state','=','confirm')]}"/>
</xpath> </xpath>
</field> </field>
</record> </record>
<record id="view_bank_statement_tree_voucher" model="ir.ui.view"> <record id="view_bank_statement_form_voucher" model="ir.ui.view">
<field name="name">account.bank.statement.voucher.tree.inherit</field> <field name="name">account.bank.statement.voucher.tree.inherit</field>
<field name="model">account.bank.statement</field> <field name="model">account.bank.statement</field>
<field name="inherit_id" ref="account.view_bank_statement_form"/> <field name="inherit_id" ref="account.view_bank_statement_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<xpath expr="//page[@name='statement_line_ids']/field[@name='line_ids']/tree/field[@name='amount']" position="after"> <xpath expr="//page[@name='statement_line_ids']/field[@name='line_ids']/tree/field[@name='amount']" position="after">
<field name="voucher_id" context="{'line_type': type, 'default_type': amount &lt; 0 and 'payment' or 'receipt', 'type': amount &lt; 0 and 'payment' or 'receipt', 'default_partner_id': partner_id, 'default_journal_id': parent.journal_id, 'default_amount': abs(amount), 'default_reference': ref, 'default_date': date, 'default_name': name}"/> <field name="voucher_id" widget="many2onebutton" options="{'label':{'create':'Reconcile','edit':'Edit Reconciliation'}}" context="{'line_type': type, 'default_type': amount &lt; 0 and 'payment' or 'receipt', 'type': amount &lt; 0 and 'payment' or 'receipt', 'default_partner_id': partner_id, 'default_journal_id': parent.journal_id, 'default_amount': abs(amount), 'default_reference': ref, 'default_date': date, 'default_name': name, 'default_active': False}"/>
</xpath> </xpath>
<xpath expr="//page[@name='statement_line_ids']/field[@name='line_ids']/form/group/field[@name='sequence']" position="before">
<field name="voucher_id" widget="many2onebutton" options="{'label':{'create':'Reconcile','edit':'Edit Reconciliation'}}" context="{'line_type': type, 'default_type': amount &lt; 0 and 'payment' or 'receipt', 'type': amount &lt; 0 and 'payment' or 'receipt', 'default_partner_id': partner_id, 'default_journal_id': parent.journal_id, 'default_amount': abs(amount), 'default_reference': ref, 'default_date': date, 'default_name': name, 'default_active': False}"/>
</xpath>
<field name="amount" position="attributes">
<attribute name="on_change">onchange_amount(amount)</attribute>
</field>
</field> </field>
</record> </record>
<record id="view_bank_statement_form_voucher" model="ir.ui.view">
<field name="name">account.bank.statement.voucher.form.inherit</field>
<field name="model">account.bank.statement</field>
<field name="inherit_id" ref="account.view_bank_statement_form"/>
<field name="arch" type="xml">
<xpath expr="//page[@name='statement_line_ids']/field[@name='line_ids']/form/group/field[@name='sequence']" position="before">
<field name="voucher_id" context="{'line_type': type, 'default_type': amount &lt; 0 and 'payment' or 'receipt', 'type': amount &lt; 0 and 'payment' or 'receipt', 'default_partner_id': partner_id, 'default_journal_id': parent.journal_id, 'default_amount': abs(amount), 'default_reference': ref, 'default_date': date, 'default_name': name}"/>
</xpath>
</field>
</record>
<record id="view_cash_statement_tree_voucher" model="ir.ui.view"> <record id="view_cash_statement_tree_voucher" model="ir.ui.view">
<field name="name">account.cash.statement.voucher.tree.inherit</field> <field name="name">account.cash.statement.voucher.tree.inherit</field>
<field name="model">account.bank.statement</field> <field name="model">account.bank.statement</field>

View File

@ -7,14 +7,15 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n" "Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n" "Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-02-08 01:37+0100\n" "POT-Creation-Date: 2012-02-08 01:37+0100\n"
"PO-Revision-Date: 2012-05-10 17:31+0000\n" "PO-Revision-Date: 2012-11-07 13:27+0000\n"
"Last-Translator: Fabien (Open ERP) <fp@tinyerp.com>\n" "Last-Translator: Frederic Clementi - Camptocamp.com "
"<frederic.clementi@camptocamp.com>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-30 05:19+0000\n" "X-Launchpad-Export-Date: 2012-11-08 04:47+0000\n"
"X-Generator: Launchpad (build 16206)\n" "X-Generator: Launchpad (build 16232)\n"
#. module: account_voucher #. module: account_voucher
#: view:sale.receipt.report:0 #: view:sale.receipt.report:0
@ -469,7 +470,7 @@ msgstr "Délai moyen de règlement"
#. module: account_voucher #. module: account_voucher
#: field:res.company,income_currency_exchange_account_id:0 #: field:res.company,income_currency_exchange_account_id:0
msgid "Income Currency Rate" msgid "Income Currency Rate"
msgstr "Taux de change d'achat" msgstr "Compte de gain de change"
#. module: account_voucher #. module: account_voucher
#: code:addons/account_voucher/account_voucher.py:1063 #: code:addons/account_voucher/account_voucher.py:1063
@ -625,9 +626,9 @@ msgid ""
"Unable to create accounting entry for currency rate difference. You have to " "Unable to create accounting entry for currency rate difference. You have to "
"configure the field 'Income Currency Rate' on the company! " "configure the field 'Income Currency Rate' on the company! "
msgstr "" msgstr ""
"Impossible de créer une entrée de la comptabilité à cause de la différence " "Impossible de créer une écriture comptable à cause de la différence de taux "
"de taux de change. Vous devez configurer le champ 'Taux de change de vente' " "de change. Vous devez configurer le champ 'Compte de gain de change' au "
"sur la société! " "niveau du formulaire de la société! "
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 view:sale.receipt.report:0 #: view:account.voucher:0 view:sale.receipt.report:0
@ -802,7 +803,7 @@ msgstr "Factures et transactions exceptionnelles"
#. module: account_voucher #. module: account_voucher
#: field:res.company,expense_currency_exchange_account_id:0 #: field:res.company,expense_currency_exchange_account_id:0
msgid "Expense Currency Rate" msgid "Expense Currency Rate"
msgstr "Taux de change de la dépense" msgstr "Compte de perte de change"
#. module: account_voucher #. module: account_voucher
#: sql_constraint:account.invoice:0 #: sql_constraint:account.invoice:0
@ -1089,9 +1090,9 @@ msgid ""
"Unable to create accounting entry for currency rate difference. You have to " "Unable to create accounting entry for currency rate difference. You have to "
"configure the field 'Expense Currency Rate' on the company! " "configure the field 'Expense Currency Rate' on the company! "
msgstr "" msgstr ""
"Impossible de créer une entrée en comptabilité pour la différence de taux de " "Impossible de créer une écriture comptable à cause de la différence de taux "
"change. Vous devez configurer le champ \"Taux de change d'achat\" de la " "de change. Vous devez configurer le champ 'Compte de perte de change' au "
"société ! " "niveau du formulaire de la société! "
#. module: account_voucher #. module: account_voucher
#: field:account.voucher,type:0 #: field:account.voucher,type:0
@ -1156,7 +1157,7 @@ msgstr "Année"
#. module: account_voucher #. module: account_voucher
#: field:account.voucher.line,amount_unreconciled:0 #: field:account.voucher.line,amount_unreconciled:0
msgid "Open Balance" msgid "Open Balance"
msgstr "Solde initial" msgstr "Restant dû"
#. module: account_voucher #. module: account_voucher
#: view:account.voucher:0 field:account.voucher,amount:0 #: view:account.voucher:0 field:account.voucher,amount:0

View File

@ -54,6 +54,8 @@
<form string="Bill Payment" version="7.0"> <form string="Bill Payment" version="7.0">
<group col="6"> <group col="6">
<field name="partner_id" required="1" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" string="Supplier" context="{'default_customer': 0, 'search_default_supplier': 1, 'default_supplier': 1, 'invoice_currency': currency_id}"/> <field name="partner_id" required="1" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" string="Supplier" context="{'default_customer': 0, 'search_default_supplier': 1, 'default_supplier': 1, 'invoice_currency': currency_id}"/>
<field name="state" invisible="1"/>
<field name="company_id" invisible="1"/>
<field name="amount" on_change="onchange_amount(amount, payment_rate, partner_id, journal_id, currency_id, type, date, payment_rate_currency_id, company_id, context)"/> <field name="amount" on_change="onchange_amount(amount, payment_rate, partner_id, journal_id, currency_id, type, date, payment_rate_currency_id, company_id, context)"/>
<field name="journal_id" <field name="journal_id"
domain="[('type','in',['bank', 'cash'])]" domain="[('type','in',['bank', 'cash'])]"
@ -390,35 +392,33 @@
<field name="model">account.voucher</field> <field name="model">account.voucher</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Receipt" version="7.0"> <form string="Receipt" version="7.0">
<header> <header invisible="context.get('line_type', False)">
<button name="proforma_voucher" string="Validate" states="draft" invisible="context.get('line_type', False)" class="oe_highlight"/> <button name="proforma_voucher" string="Validate" states="draft" class="oe_highlight"/>
<button name="cancel_voucher" string="Cancel" states="draft,proforma" invisible="context.get('line_type', False)"/> <button name="cancel_voucher" string="Cancel" states="draft,proforma"/>
<button name="cancel_voucher" string="Unreconcile" type="object" states="posted" invisible="context.get('line_type', False)" confirm="Are you sure to unreconcile and cancel this record ?"/> <button name="cancel_voucher" string="Unreconcile" type="object" states="posted" confirm="Are you sure to unreconcile and cancel this record ?"/>
<button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft" invisible="context.get('line_type', False)"/> <button name="action_cancel_draft" type="object" states="cancel" string="Set to Draft"/>
<field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/> <field name="state" widget="statusbar" statusbar_visible="draft,posted" statusbar_colors='{"proforma":"blue"}'/>
</header> </header>
<sheet> <sheet>
<h1 attrs="{'invisible': [('number','=',False)]}"><field name="number"/></h1> <h1 attrs="{'invisible': [('number','=',False)]}"><field name="number"/></h1>
<group> <group invisible="context.get('line_type', False)">
<group> <group>
<field name="partner_id" domain="[('customer','=',True)]" required="1" invisible="context.get('line_type', False)" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" string="Customer" context="{'search_default_customer': 1}"/> <field name="partner_id" domain="[('customer','=',True)]" required="1" on_change="onchange_partner_id(partner_id, journal_id, amount, currency_id, type, date, context)" string="Customer" context="{'search_default_customer': 1}"/>
<field name="currency_id" invisible="1"/> <field name="currency_id" invisible="1"/>
<field name="amount" class="oe_inline" <field name="amount" class="oe_inline"
string="Paid Amount" string="Paid Amount"
widget="monetary" options="{'currency_field': 'currency_id'}" widget="monetary" options="{'currency_field': 'currency_id'}"
invisible="context.get('line_type', False)"
on_change="onchange_amount(amount, payment_rate, partner_id, journal_id, currency_id, type, date, payment_rate_currency_id, company_id, context)"/> on_change="onchange_amount(amount, payment_rate, partner_id, journal_id, currency_id, type, date, payment_rate_currency_id, company_id, context)"/>
<field name="journal_id" <field name="journal_id"
domain="[('type','in',['bank', 'cash'])]" domain="[('type','in',['bank', 'cash'])]"
invisible="context.get('line_type', False)"
widget="selection" widget="selection"
on_change="onchange_journal(journal_id, line_cr_ids, False, partner_id, date, amount, type, company_id, context)" on_change="onchange_journal(journal_id, line_cr_ids, False, partner_id, date, amount, type, company_id, context)"
string="Payment Method"/> string="Payment Method"/>
</group> </group>
<group> <group>
<field name="date" invisible="context.get('line_type', False)" on_change="onchange_date(date, currency_id, payment_rate_currency_id, amount, company_id, context)"/> <field name="date" on_change="onchange_date(date, currency_id, payment_rate_currency_id, amount, company_id, context)"/>
<field name="reference" invisible="context.get('line_type', False)" string="Payment Ref" placeholder="e.g. 003/10"/> <field name="reference" string="Payment Ref" placeholder="e.g. 003/10"/>
<field name="name" colspan="2" invisible="context.get('line_type', False)" placeholder="e.g. Invoice SAJ/0042"/> <field name="name" colspan="2" placeholder="e.g. Invoice SAJ/0042"/>
<field name="company_id" widget="selection" groups="base.group_multi_company"/> <field name="company_id" widget="selection" groups="base.group_multi_company"/>
<field name="account_id" <field name="account_id"
@ -430,7 +430,7 @@
</group> </group>
<notebook> <notebook>
<page string="Payment Information" groups="base.group_user"> <page string="Payment Information" groups="base.group_user">
<label for="line_cr_ids"/> <label for="line_cr_ids" invisible="context.get('line_type', False)"/>
<field name="line_cr_ids" context="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" on_change="onchange_line_ids(line_dr_ids, line_cr_ids, amount, currency_id, type, context)"> <field name="line_cr_ids" context="{'journal_id':journal_id, 'type':type, 'partner_id':partner_id}" on_change="onchange_line_ids(line_dr_ids, line_cr_ids, amount, currency_id, type, context)">
<tree string="Invoices and outstanding transactions" editable="bottom" colors="gray:amount==0"> <tree string="Invoices and outstanding transactions" editable="bottom" colors="gray:amount==0">
<field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}" <field name="move_line_id" context="{'journal_id':parent.journal_id, 'partner_id':parent.partner_id}"
@ -511,7 +511,7 @@
</page> </page>
</notebook> </notebook>
</sheet> </sheet>
<div class="oe_chatter"> <div class="oe_chatter" invisible="context.get('line_type', False)">
<field name="message_follower_ids" widget="mail_followers"/> <field name="message_follower_ids" widget="mail_followers"/>
<field name="message_ids" widget="mail_thread"/> <field name="message_ids" widget="mail_thread"/>
</div> </div>

View File

@ -50,7 +50,7 @@
<field name="res_model">account.voucher</field> <field name="res_model">account.voucher</field>
<field name="view_type">form</field> <field name="view_type">form</field>
<field name="domain">[('journal_id.type', 'in', ['bank', 'cash']), ('type','=','receipt'), ('partner_id','=',partner_id)]</field> <field name="domain">[('journal_id.type', 'in', ['bank', 'cash']), ('type','=','receipt'), ('partner_id','=',partner_id)]</field>
<field name="context">{'type':'receipt', 'partner_id': partner_id, 'default_reference':reference}</field> <field name="context">{'default_type':'receipt', 'type':'receipt', 'partner_id': partner_id, 'default_reference':reference}</field>
<field name="view_id" ref="view_vendor_receipt_form"/> <field name="view_id" ref="view_vendor_receipt_form"/>
<field name="target">current</field> <field name="target">current</field>
</record> </record>

View File

@ -98,12 +98,11 @@ class account_analytic_account(osv.osv):
def name_get(self, cr, uid, ids, context=None): def name_get(self, cr, uid, ids, context=None):
res = [] res = []
full_ids = [] if not ids:
if isinstance(ids,list): return res
full_ids.extend(ids) if isinstance(ids, (int, long)):
else: ids = [ids]
full_ids.append(ids) for id in ids:
for id in full_ids:
elmt = self.browse(cr, uid, id, context=context) elmt = self.browse(cr, uid, id, context=context)
res.append((id, self._get_one_full_name(elmt))) res.append((id, self._get_one_full_name(elmt)))
return res return res

View File

@ -40,7 +40,7 @@
Once the end date of the contract is Once the end date of the contract is
passed or the maximum number of service passed or the maximum number of service
units (e.g. support contract) is units (e.g. support contract) is
reached, the account manager is warned reached, the account manager is notified
by email to renew the contract with the by email to renew the contract with the
customer. customer.
</p> </p>

View File

@ -388,6 +388,8 @@ class audittrail_objects_proxy(object_proxy):
} }
# loop on all the fields # loop on all the fields
for field_name, field_definition in pool.get(model.model)._all_columns.items(): for field_name, field_definition in pool.get(model.model)._all_columns.items():
if field_name in ('__last_update', 'id'):
continue
#if the field_list param is given, skip all the fields not in that list #if the field_list param is given, skip all the fields not in that list
if field_list and field_name not in field_list: if field_list and field_name not in field_list:
continue continue

View File

@ -99,7 +99,7 @@
<field name="res_id" readonly="1"/> <field name="res_id" readonly="1"/>
<field name="object_id" readonly="1"/> <field name="object_id" readonly="1"/>
</group> </group>
<field name="line_ids" mode="tree,form" <field name="line_ids" mode="tree"
widget="one2many_list" readonly="1"> widget="one2many_list" readonly="1">
<form string="Log Lines" version="7.0"> <form string="Log Lines" version="7.0">
<group col="4"> <group col="4">

View File

@ -3,7 +3,7 @@ openerp.auth_anonymous = function(instance) {
instance.web.Login.include({ instance.web.Login.include({
start: function() { start: function() {
var self = this; var self = this;
return $.when(this._super()).pipe(function() { return $.when(this._super()).then(function() {
var dblist = self._db_list || []; var dblist = self._db_list || [];
if (!self.session.session_is_valid() && dblist.length === 1) { if (!self.session.session_is_valid() && dblist.length === 1) {
self.remember_credentials = false; self.remember_credentials = false;

View File

@ -12,7 +12,7 @@ openerp.auth_oauth = function(instance) {
} else if(this.params.oauth_error === 2) { } else if(this.params.oauth_error === 2) {
this.do_warn("Authentication error",""); this.do_warn("Authentication error","");
} }
return d.then(this.do_oauth_load).fail(function() { return d.done(this.do_oauth_load).fail(function() {
self.do_oauth_load([]); self.do_oauth_load([]);
}); });
}, },
@ -23,7 +23,7 @@ openerp.auth_oauth = function(instance) {
do_oauth_load: function() { do_oauth_load: function() {
var db = this.$("form [name=db]").val(); var db = this.$("form [name=db]").val();
if (db) { if (db) {
this.rpc("/auth_oauth/list_providers", { dbname: db }).then(this.on_oauth_loaded); this.rpc("/auth_oauth/list_providers", { dbname: db }).done(this.on_oauth_loaded);
} }
}, },
on_oauth_loaded: function(result) { on_oauth_loaded: function(result) {

View File

@ -69,7 +69,7 @@ instance.web.Login = instance.web.Login.extend({
_check_error: function() { _check_error: function() {
var self = this; var self = this;
if (this.params.loginerror !== undefined) { if (this.params.loginerror !== undefined) {
this.rpc('/auth_openid/login/status', {}).then(function(result) { this.rpc('/auth_openid/login/status', {}).done(function(result) {
if (_.contains(['success', 'failure'], result.status) && result.message) { if (_.contains(['success', 'failure'], result.status) && result.message) {
self.do_warn('Invalid OpenID Login', result.message); self.do_warn('Invalid OpenID Login', result.message);
} }
@ -106,7 +106,7 @@ instance.web.Login = instance.web.Login.extend({
do_openid_login: function(db, openid_url) { do_openid_login: function(db, openid_url) {
var self = this; var self = this;
this.rpc('/auth_openid/login/verify', {'db': db, 'url': openid_url}).then(function(result) { this.rpc('/auth_openid/login/verify', {'db': db, 'url': openid_url}).done(function(result) {
if (result.error) { if (result.error) {
self.do_warn(result.title, result.error); self.do_warn(result.title, result.error);
return; return;

View File

@ -16,10 +16,10 @@
<group col="4"> <group col="4">
<field name="name"/> <field name="name"/>
<field name="model_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="filter_id" domain="[('model_id','=',model)]" context="{'default_model_id': model}"/>
<field name="sequence"/> <field name="sequence"/>
<field name="active"/> <field name="active"/>
<field name="model" invisible="1"/>
</group> </group>
<notebook> <notebook>
<page string="Conditions"> <page string="Conditions">

View File

@ -8,15 +8,14 @@ msgstr ""
"Project-Id-Version: openobject-addons\n" "Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-02-08 00:36+0000\n" "POT-Creation-Date: 2012-02-08 00:36+0000\n"
"PO-Revision-Date: 2012-05-10 17:24+0000\n" "PO-Revision-Date: 2012-11-09 12:09+0000\n"
"Last-Translator: Jordi Esteve (www.zikzakmedia.com) " "Last-Translator: Pedro Manuel Baeza <pedro.baeza@gmail.com>\n"
"<jesteve@zikzakmedia.com>\n"
"Language-Team: Spanish <es@li.org>\n" "Language-Team: Spanish <es@li.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-30 05:32+0000\n" "X-Launchpad-Export-Date: 2012-11-10 04:59+0000\n"
"X-Generator: Launchpad (build 16206)\n" "X-Generator: Launchpad (build 16251)\n"
#. module: base_action_rule #. module: base_action_rule
#: help:base.action.rule,act_mail_to_user:0 #: help:base.action.rule,act_mail_to_user:0
@ -340,7 +339,7 @@ msgstr "Activo"
#: code:addons/base_action_rule/base_action_rule.py:329 #: code:addons/base_action_rule/base_action_rule.py:329
#, python-format #, python-format
msgid "No Email ID Found for your Company address!" msgid "No Email ID Found for your Company address!"
msgstr "" msgstr "¡No se ha encontrado Id del e-mail para la dirección de su compañía!"
#. module: base_action_rule #. module: base_action_rule
#: field:base.action.rule,act_remind_user:0 #: field:base.action.rule,act_remind_user:0

View File

@ -200,7 +200,7 @@ class users(osv.osv):
else: else:
# Return early if no one has a login name like that. # Return early if no one has a login name like that.
return False return False
print "<--------------------------- HELLO ------------------------------>"
stored_pw = self.maybe_encrypt(cr, stored_pw, id) stored_pw = self.maybe_encrypt(cr, stored_pw, id)
if not stored_pw: if not stored_pw:

View File

@ -99,6 +99,8 @@ class res_partner_bank(osv.osv):
@param iban: IBAN as string @param iban: IBAN as string
@return: True if IBAN is valid, False otherwise @return: True if IBAN is valid, False otherwise
""" """
if not iban:
return False
iban = _format_iban(iban).lower() iban = _format_iban(iban).lower()
if iban[:2] in _ref_iban and len(iban) != len(_format_iban(_ref_iban[iban[:2]])): if iban[:2] in _ref_iban and len(iban) != len(_format_iban(_ref_iban[iban[:2]])):
return False return False
@ -128,9 +130,9 @@ class res_partner_bank(osv.osv):
def _construct_constraint_msg(self, cr, uid, ids, context=None): def _construct_constraint_msg(self, cr, uid, ids, context=None):
def default_iban_check(iban_cn): def default_iban_check(iban_cn):
return iban_cn[0] in string.ascii_lowercase and iban_cn[1] in string.ascii_lowercase return iban_cn and iban_cn[0] in string.ascii_lowercase and iban_cn[1] in string.ascii_lowercase
iban_country = self.browse(cr, uid, ids)[0].acc_number[:2].lower() iban_country = self.browse(cr, uid, ids)[0].acc_number and self.browse(cr, uid, ids)[0].acc_number[:2].lower()
if default_iban_check(iban_country): if default_iban_check(iban_country):
if iban_country in _ref_iban: if iban_country in _ref_iban:
return _('The IBAN does not seem to be correct. You should have entered something like this %s'), \ return _('The IBAN does not seem to be correct. You should have entered something like this %s'), \

View File

@ -139,7 +139,7 @@ openerp.base_import = function (instance) {
this._super(), this._super(),
this.Import.call('create', [{ this.Import.call('create', [{
'res_model': this.res_model 'res_model': this.res_model
}]).then(function (id) { }]).done(function (id) {
self.id = id; self.id = id;
self.$('input[name=import_id]').val(id); self.$('input[name=import_id]').val(id);
}) })
@ -200,7 +200,7 @@ openerp.base_import = function (instance) {
!this.$('input.oe_import_has_header').prop('checked')); !this.$('input.oe_import_has_header').prop('checked'));
this.Import.call( this.Import.call(
'parse_preview', [this.id, this.import_options()]) 'parse_preview', [this.id, this.import_options()])
.then(function (result) { .done(function (result) {
var signal = result.error ? 'preview_failed' : 'preview_succeeded'; var signal = result.error ? 'preview_failed' : 'preview_succeeded';
self[signal](result); self[signal](result);
}); });
@ -341,11 +341,11 @@ openerp.base_import = function (instance) {
}, },
onvalidate: function () { onvalidate: function () {
return this.call_import({ dryrun: true }) return this.call_import({ dryrun: true })
.then(this.proxy('validated')); .done(this.proxy('validated'));
}, },
onimport: function () { onimport: function () {
var self = this; var self = this;
return this.call_import({ dryrun: false }).then(function (message) { return this.call_import({ dryrun: false }).done(function (message) {
if (!_.any(message, function (message) { if (!_.any(message, function (message) {
return message.type === 'error' })) { return message.type === 'error' })) {
self['import_succeeded'](); self['import_succeeded']();

View File

@ -60,14 +60,14 @@ class sale_config_settings(osv.osv_memory):
'module_web_linkedin': fields.boolean('Get contacts automatically from linkedIn', 'module_web_linkedin': fields.boolean('Get contacts automatically from linkedIn',
help="""When you create a new contact (person or company), you will be able to load all the data from LinkedIn (photos, address, etc)."""), help="""When you create a new contact (person or company), you will be able to load all the data from LinkedIn (photos, address, etc)."""),
'module_crm': fields.boolean('CRM'), 'module_crm': fields.boolean('CRM'),
'module_plugin_thunderbird': fields.boolean('Enable Thunderbird plugin', 'module_plugin_thunderbird': fields.boolean('Enable Thunderbird plug-in',
help="""The plugin allows you archive email and its attachments to the selected help="""The plugin allows you archive email and its attachments to the selected
OpenERP objects. You can select a partner, or a lead and OpenERP objects. You can select a partner, or a lead and
attach the selected mail as a .eml file in attach the selected mail as a .eml file in
the attachment of a selected record. You can create documents for CRM Lead, the attachment of a selected record. You can create documents for CRM Lead,
Partner from the selected emails. Partner from the selected emails.
This installs the module plugin_thunderbird."""), This installs the module plugin_thunderbird."""),
'module_plugin_outlook': fields.boolean('Enable Outlook plugin', 'module_plugin_outlook': fields.boolean('Enable Outlook plug-in',
help="""The Outlook plugin allows you to select an object that you would like to add help="""The Outlook plugin allows you to select an object that you would like to add
to your email and its attachments from MS Outlook. You can select a partner, to your email and its attachments from MS Outlook. You can select a partner,
or a lead object and archive a selected or a lead object and archive a selected

View File

@ -46,7 +46,7 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({
delete(action.attrs.colspan); delete(action.attrs.colspan);
var action_id = _.str.toNumber(action.attrs.name); var action_id = _.str.toNumber(action.attrs.name);
if (!_.isNaN(action_id)) { if (!_.isNaN(action_id)) {
self.rpc('/web/action/load', {action_id: action_id}).then(function(result) { self.rpc('/web/action/load', {action_id: action_id}).done(function(result) {
self.on_load_action(result, column_index + '_' + action_index, action.attrs); self.on_load_action(result, column_index + '_' + action_index, action.attrs);
}); });
} }
@ -81,7 +81,7 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({
this.rpc('/web/view/undo_custom', { this.rpc('/web/view/undo_custom', {
view_id: this.view.fields_view.view_id, view_id: this.view.fields_view.view_id,
reset: true reset: true
}).then(this.do_reload); }).done(this.do_reload);
}, },
on_change_layout: function() { on_change_layout: function() {
var self = this; var self = this;
@ -242,7 +242,7 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({
}; };
var list = am.inner_widget.views.list; var list = am.inner_widget.views.list;
if (list) { if (list) {
list.deferred.then(function() { list.deferred.done(function() {
$(list.controller.groups).off('row_link').on('row_link', function(e, id) { $(list.controller.groups).off('row_link').on('row_link', function(e, id) {
new_form_action(id); new_form_action(id);
}); });
@ -250,7 +250,7 @@ instance.web.form.DashBoard = instance.web.form.FormWidget.extend({
} }
var kanban = am.inner_widget.views.kanban; var kanban = am.inner_widget.views.kanban;
if (kanban) { if (kanban) {
kanban.deferred.then(function() { kanban.deferred.done(function() {
kanban.controller.open_record = function(id, editable) { kanban.controller.open_record = function(id, editable) {
new_form_action(id, editable); new_form_action(id, editable);
}; };
@ -335,7 +335,7 @@ instance.board.AddToDashboard = instance.web.search.Input.extend({
e.preventDefault(); e.preventDefault();
self.add_dashboard(); self.add_dashboard();
}); });
return this.load_data().then(this.proxy("render_data")); return this.load_data().done(this.proxy("render_data"));
}, },
load_data:function(){ load_data:function(){
var board = new instance.web.Model('board.board'); var board = new instance.web.Model('board.board');
@ -347,7 +347,7 @@ instance.board.AddToDashboard = instance.web.search.Input.extend({
return new instance.web.Model('ir.model.data') return new instance.web.Model('ir.model.data')
.query(['res_id']) .query(['res_id'])
.filter([['name','=','menu_reporting_dashboard']]) .filter([['name','=','menu_reporting_dashboard']])
.first().pipe(function (result) { .first().then(function (result) {
var menu = _(dashboard_menu).chain() var menu = _(dashboard_menu).chain()
.pluck('children') .pluck('children')
.flatten(true) .flatten(true)
@ -382,7 +382,7 @@ instance.board.AddToDashboard = instance.web.search.Input.extend({
domain: domain, domain: domain,
view_mode: view_parent.active_view, view_mode: view_parent.active_view,
name: this.$el.find("input").val() name: this.$el.find("input").val()
}).then(function(r) { }).done(function(r) {
if (r === false) { if (r === false) {
self.do_warn("Could not add filter to dashboard"); self.do_warn("Could not add filter to dashboard");
} else { } else {

View File

@ -115,7 +115,6 @@ class crm_case_section(osv.osv):
'code': fields.char('Code', size=8), 'code': fields.char('Code', size=8),
'active': fields.boolean('Active', help="If the active field is set to "\ 'active': fields.boolean('Active', help="If the active field is set to "\
"true, it will allow you to hide the sales team without removing it."), "true, it will allow you to hide the sales team without removing it."),
'allow_unlink': fields.boolean('Allow Delete', help="Allows to delete non draft cases"),
'change_responsible': fields.boolean('Reassign Escalated', help="When escalating to this team override the salesman with the team leader."), 'change_responsible': fields.boolean('Reassign Escalated', help="When escalating to this team override the salesman with the team leader."),
'user_id': fields.many2one('res.users', 'Team Leader'), 'user_id': fields.many2one('res.users', 'Team Leader'),
'member_ids':fields.many2many('res.users', 'sale_member_rel', 'section_id', 'member_id', 'Team Members'), 'member_ids':fields.many2many('res.users', 'sale_member_rel', 'section_id', 'member_id', 'Team Members'),
@ -137,7 +136,6 @@ class crm_case_section(osv.osv):
_defaults = { _defaults = {
'active': 1, 'active': 1,
'allow_unlink': 1,
'stage_ids': _get_stage_common, 'stage_ids': _get_stage_common,
'alias_domain': False, # always hide alias during creation 'alias_domain': False, # always hide alias during creation
} }

View File

@ -79,7 +79,7 @@ class base_action_rule(osv.osv):
write['section_id'] = action.act_section_id.id write['section_id'] = action.act_section_id.id
if hasattr(action, 'act_categ_id') and action.act_categ_id: if hasattr(action, 'act_categ_id') and action.act_categ_id:
write['categ_ids'] = [4, action.act_categ_id.id] write['categ_ids'] = [(4, action.act_categ_id.id)]
model_obj.write(cr, uid, [obj.id], write, context) model_obj.write(cr, uid, [obj.id], write, context)
return res return res

View File

@ -610,9 +610,9 @@ class crm_lead(base_stage, format_address, osv.osv):
} }
def convert_opportunity(self, cr, uid, ids, partner_id, user_ids=False, section_id=False, context=None): def convert_opportunity(self, cr, uid, ids, partner_id, user_ids=False, section_id=False, context=None):
partner = self.pool.get('res.partner')
customer = False customer = False
if partner_id: if partner_id:
partner = self.pool.get('res.partner')
customer = partner.browse(cr, uid, partner_id, context=context) customer = partner.browse(cr, uid, partner_id, context=context)
for lead in self.browse(cr, uid, ids, context=context): for lead in self.browse(cr, uid, ids, context=context):
if lead.state in ('done', 'cancel'): if lead.state in ('done', 'cancel'):
@ -676,19 +676,17 @@ class crm_lead(base_stage, format_address, osv.osv):
def convert_partner(self, cr, uid, ids, action='create', partner_id=False, context=None): def convert_partner(self, cr, uid, ids, action='create', partner_id=False, context=None):
""" """
This function convert partner based on action. Convert partner based on action.
if action is 'create', create new partner with contact and assign lead to new partner_id. if action is 'create', create new partner with contact and assign lead to new partner_id.
otherwise assign lead to specified partner_id otherwise assign lead to specified partner_id
""" """
if context is None: if context is None:
context = {} context = {}
partner_ids = {} partner_ids = {}
force_partner_id = partner_id
for lead in self.browse(cr, uid, ids, context=context): for lead in self.browse(cr, uid, ids, context=context):
if action == 'create': if action == 'create':
if not partner_id: if not partner_id:
partner_id = self._create_lead_partner(cr, uid, lead, context) partner_id = self._create_lead_partner(cr, uid, lead, context)
partner_id = force_partner_id or self._create_lead_partner(cr, uid, lead, context=context)
self._lead_set_partner(cr, uid, lead, partner_id, context=context) self._lead_set_partner(cr, uid, lead, partner_id, context=context)
partner_ids[lead.id] = partner_id partner_ids[lead.id] = partner_id
return partner_ids return partner_ids
@ -781,14 +779,6 @@ class crm_lead(base_stage, format_address, osv.osv):
} }
return res return res
def unlink(self, cr, uid, ids, context=None):
for lead in self.browse(cr, uid, ids, context):
if (not lead.section_id.allow_unlink) and (lead.state != 'draft'):
raise osv.except_osv(_('Error!'),
_("You cannot delete lead '%s' because it is not in 'Draft' state. " \
"You can still cancel it, instead of deleting it.") % lead.name)
return super(crm_lead, self).unlink(cr, uid, ids, context)
def write(self, cr, uid, ids, vals, context=None): def write(self, cr, uid, ids, vals, context=None):
if vals.get('stage_id') and not vals.get('probability'): if vals.get('stage_id') and not vals.get('probability'):
# change probability of lead(s) if required by stage # change probability of lead(s) if required by stage

View File

@ -56,6 +56,7 @@ added to partners that match the segmentation criterions after computation.'),
@param uid: the current users ID for security checks, @param uid: the current users ID for security checks,
@param ids: List of Process continues IDs""" @param ids: List of Process continues IDs"""
partner_obj = self.pool.get('res.partner')
categs = self.read(cr, uid, ids, ['categ_id', 'exclusif', 'partner_id',\ categs = self.read(cr, uid, ids, ['categ_id', 'exclusif', 'partner_id',\
'sales_purchase_active', 'profiling_active']) 'sales_purchase_active', 'profiling_active'])
for categ in categs: for categ in categs:
@ -80,9 +81,11 @@ added to partners that match the segmentation criterions after computation.'),
for pid in to_remove_list: for pid in to_remove_list:
partners.remove(pid) partners.remove(pid)
for partner_id in partners: for partner in partner_obj.browse(cr, uid, partners):
cr.execute('insert into res_partner_res_partner_category_rel (category_id,partner_id) \ category_ids = [categ_id.id for categ_id in partner.category_id]
values (%s,%s)', (categ['categ_id'][0], partner_id)) if categ['categ_id'][0] not in category_ids:
cr.execute('insert into res_partner_res_partner_category_rel (category_id,partner_id) \
values (%s,%s)', (categ['categ_id'][0], partner.id))
self.write(cr, uid, [id], {'state':'not running', 'partner_id':0}) self.write(cr, uid, [id], {'state':'not running', 'partner_id':0})
return True return True

View File

@ -24,9 +24,9 @@
parent="base.menu_base_config" sequence="45" groups="base.group_sale_salesman"/> parent="base.menu_base_config" sequence="45" groups="base.group_sale_salesman"/>
<menuitem id="base.next_id_64" name="Sales" <menuitem id="base.next_id_64" name="Sales"
parent="base.menu_reporting" sequence="1" /> parent="base.menu_reporting" sequence="1"/>
<menuitem id="base.menu_sales_configuration_misc" name="Miscellaneous" parent="base.menu_base_config" sequence="75"/> <menuitem id="base.menu_sales_configuration_misc" name="Miscellaneous" parent="base.menu_base_config" sequence="81"/>
<!-- crm.case.channel --> <!-- crm.case.channel -->
@ -86,7 +86,7 @@
<field name="parent_id"/> <field name="parent_id"/>
<field name="code"/> <field name="code"/>
</group> </group>
<group> <group>
<field name="user_id"/> <field name="user_id"/>
<field name="resource_calendar_id"/> <field name="resource_calendar_id"/>
@ -102,7 +102,6 @@
<field name="alias_name" class="oe_inline" attrs="{'required': [('alias_id', '!=', False)]}"/>@<field name="alias_domain" class="oe_inline"/> <field name="alias_name" class="oe_inline" attrs="{'required': [('alias_id', '!=', False)]}"/>@<field name="alias_domain" class="oe_inline"/>
</div> </div>
<field name="change_responsible"/> <field name="change_responsible"/>
<field name="allow_unlink"/>
</group> </group>
<separator string="Team Members"/> <separator string="Team Members"/>
<field name="member_ids" widget="many2many_kanban"> <field name="member_ids" widget="many2many_kanban">
@ -163,7 +162,7 @@
<field name="view_id" ref="crm_case_section_view_tree"/> <field name="view_id" ref="crm_case_section_view_tree"/>
<field name="help" type="html"> <field name="help" type="html">
<p class="oe_view_nocontent_create"> <p class="oe_view_nocontent_create">
Click to define a new sales team. Click to define a new sales team.
</p><p> </p><p>
Use sales team to organize your different salespersons or Use sales team to organize your different salespersons or
departments into separate teams. Each team will work in departments into separate teams. Each team will work in
@ -203,7 +202,7 @@
<form string="Stage" version="7.0"> <form string="Stage" version="7.0">
<group col="4"> <group col="4">
<field name="name"/> <field name="name"/>
<field name="state" /> <field name="state"/>
<field name="probability"/> <field name="probability"/>
<field name="type"/> <field name="type"/>
<field name="on_change"/> <field name="on_change"/>
@ -228,7 +227,7 @@
</record> </record>
<!-- Case Categories Form View --> <!-- Case Categories Form View -->
<record id="crm_case_categ-view" model="ir.ui.view"> <record id="crm_case_categ-view" model="ir.ui.view">
<field name="name">crm.case.categ.form</field> <field name="name">crm.case.categ.form</field>
@ -238,7 +237,7 @@
<group> <group>
<field name="name"/> <field name="name"/>
<field name="section_id"/> <field name="section_id"/>
<field name="object_id" invisible="1" /> <field name="object_id" invisible="1"/>
</group> </group>
</form> </form>
</field> </field>
@ -297,7 +296,7 @@
<menuitem action="crm_case_resource_type_act" <menuitem action="crm_case_resource_type_act"
id="menu_crm_case_resource_type_act" sequence="4" id="menu_crm_case_resource_type_act" sequence="4"
groups="base.group_no_one" groups="base.group_no_one"
parent="base.menu_crm_config_lead" /> parent="base.menu_crm_config_lead"/>
<record id="crm_case_section_act_tree" model="ir.actions.act_window"> <record id="crm_case_section_act_tree" model="ir.actions.act_window">
<field name="name">Cases by Sales Team</field> <field name="name">Cases by Sales Team</field>
@ -354,13 +353,13 @@
<button name="process_start" <button name="process_start"
states="not running" states="not running"
string="Compute Segmentation" type="object" string="Compute Segmentation" type="object"
icon="gtk-execute" /> icon="gtk-execute"/>
<button name="process_stop" states="running" <button name="process_stop" states="running"
string="Stop Process" type="object" string="Stop Process" type="object"
icon="gtk-cancel" /> icon="gtk-cancel"/>
<button name="process_continue" states="running" <button name="process_continue" states="running"
string="Continue Process" type="object" string="Continue Process" type="object"
icon="gtk-go-forward" /> icon="gtk-go-forward"/>
<field name="state" widget="statusbar"/> <field name="state" widget="statusbar"/>
</header> </header>
<group col="4"> <group col="4">
@ -412,7 +411,7 @@
<field name="view_mode">tree,form</field> <field name="view_mode">tree,form</field>
<field name="help" type="html"> <field name="help" type="html">
<p class="oe_view_nocontent_create"> <p class="oe_view_nocontent_create">
Click to define a new customer segmentation. Click to define a new customer segmentation.
</p><p> </p><p>
Create specific categories which you can assign to your Create specific categories which you can assign to your
contacts to better manage your interactions with them. The contacts to better manage your interactions with them. The
@ -425,7 +424,7 @@
<menuitem action="crm_segmentation_tree-act" <menuitem action="crm_segmentation_tree-act"
id="menu_crm_segmentation-act" id="menu_crm_segmentation-act"
groups="base.group_no_one" sequence="15" groups="base.group_no_one" sequence="15"
parent="base.menu_base_config" /> parent="base.menu_base_config"/>
<!-- menu for the working time --> <!-- menu for the working time -->
<menuitem action="resource.action_resource_calendar_form" id="menu_action_resource_calendar_form" parent="resource.menu_resource_config" sequence="1"/> <menuitem action="resource.action_resource_calendar_form" id="menu_action_resource_calendar_form" parent="resource.menu_resource_config" sequence="1"/>
@ -466,11 +465,11 @@
<field name="view_type">form</field> <field name="view_type">form</field>
<field name="view_mode">tree,form</field> <field name="view_mode">tree,form</field>
</record> </record>
<menuitem action="action_crm_payment_mode" <menuitem action="action_crm_payment_mode"
id="menu_crm_payment_mode_act" id="menu_crm_payment_mode_act"
groups="base.group_no_one" groups="base.group_no_one"
name="Payment Modes" name="Payment Modes"
parent="base.menu_crm_config_lead" /> parent="base.menu_crm_config_lead"/>
</data> </data>
</openerp> </openerp>

View File

@ -7,14 +7,14 @@ msgstr ""
"Project-Id-Version: OpenERP Server 6.0dev\n" "Project-Id-Version: OpenERP Server 6.0dev\n"
"Report-Msgid-Bugs-To: support@openerp.com\n" "Report-Msgid-Bugs-To: support@openerp.com\n"
"POT-Creation-Date: 2012-02-08 01:37+0100\n" "POT-Creation-Date: 2012-02-08 01:37+0100\n"
"PO-Revision-Date: 2012-02-10 17:48+0000\n" "PO-Revision-Date: 2012-11-09 12:10+0000\n"
"Last-Translator: Carlos Ch. <Unknown>\n" "Last-Translator: Pedro Manuel Baeza <pedro.baeza@gmail.com>\n"
"Language-Team: \n" "Language-Team: \n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-30 04:57+0000\n" "X-Launchpad-Export-Date: 2012-11-10 04:59+0000\n"
"X-Generator: Launchpad (build 16206)\n" "X-Generator: Launchpad (build 16251)\n"
#. module: crm #. module: crm
#: view:crm.lead.report:0 #: view:crm.lead.report:0
@ -172,7 +172,7 @@ msgstr "Mes esperado de cierre"
#. module: crm #. module: crm
#: view:crm.lead2opportunity.partner.mass:0 #: view:crm.lead2opportunity.partner.mass:0
msgid "Assigned Opportunities to" msgid "Assigned Opportunities to"
msgstr "" msgstr "Oportunidades asignadas a"
#. module: crm #. module: crm
#: view:crm.lead:0 field:crm.lead,partner_id:0 view:crm.lead.report:0 #: view:crm.lead:0 field:crm.lead,partner_id:0 view:crm.lead.report:0
@ -598,7 +598,7 @@ msgstr "Fecha de fin"
#. module: crm #. module: crm
#: view:crm.opportunity2phonecall:0 view:crm.phonecall2phonecall:0 #: view:crm.opportunity2phonecall:0 view:crm.phonecall2phonecall:0
msgid "Schedule/Log a Call" msgid "Schedule/Log a Call"
msgstr "" msgstr "Planificar/Registrar una llamada"
#. module: crm #. module: crm
#: constraint:base.action.rule:0 #: constraint:base.action.rule:0
@ -792,7 +792,7 @@ msgstr "Siguiente"
#. module: crm #. module: crm
#: field:crm.segmentation,som_interval:0 #: field:crm.segmentation,som_interval:0
msgid "Days per Period" msgid "Days per Period"
msgstr "" msgstr "Días por periodo"
#. module: crm #. module: crm
#: field:crm.meeting,byday:0 #: field:crm.meeting,byday:0
@ -959,7 +959,7 @@ msgstr "Días para abrir"
#. module: crm #. module: crm
#: view:crm.meeting:0 #: view:crm.meeting:0
msgid "Show Time as" msgid "Show Time as"
msgstr "" msgstr "Mostrar hora como"
#. module: crm #. module: crm
#: view:crm.phonecall2partner:0 #: view:crm.phonecall2partner:0
@ -1342,7 +1342,7 @@ msgstr "Fecha escritura"
#. module: crm #. module: crm
#: view:crm.meeting:0 #: view:crm.meeting:0
msgid "End of Recurrency" msgid "End of Recurrency"
msgstr "" msgstr "Fin de recurrencia"
#. module: crm #. module: crm
#: view:crm.meeting:0 #: view:crm.meeting:0
@ -1392,6 +1392,12 @@ msgid ""
" \n" " \n"
"If the call needs to be done then the state is set to 'Not Held'." "If the call needs to be done then the state is set to 'Not Held'."
msgstr "" msgstr ""
"El estado se establece a 'Para hacer' cuando se crea el caso.\n"
"Si es caso está en marcha, el estado se establece a 'Abierto.\n"
"Cuando la llamada se termina, el estado se establece en 'Realizada'. "
" \n"
"Si la llamada está pendiente de ser realizada, entonces el estado se "
"establece en 'Pendiente'."
#. module: crm #. module: crm
#: selection:crm.meeting,week_list:0 #: selection:crm.meeting,week_list:0
@ -1449,7 +1455,7 @@ msgstr "Oportunidades por categorías"
#. module: crm #. module: crm
#: model:crm.case.section,name:crm.section_sales_marketing_department #: model:crm.case.section,name:crm.section_sales_marketing_department
msgid "Sales Marketing Department" msgid "Sales Marketing Department"
msgstr "" msgstr "Departamento de ventas y marketing"
#. module: crm #. module: crm
#: view:crm.phonecall.report:0 #: view:crm.phonecall.report:0
@ -1900,7 +1906,7 @@ msgstr "Responder a"
#. module: crm #. module: crm
#: view:crm.case.section:0 #: view:crm.case.section:0
msgid "Select Stages for this Sales Team" msgid "Select Stages for this Sales Team"
msgstr "" msgstr "Seleccione etapas para este equipo de ventas"
#. module: crm #. module: crm
#: view:board.board:0 #: view:board.board:0
@ -2015,7 +2021,7 @@ msgstr "Ubicación"
#. module: crm #. module: crm
#: model:ir.model,name:crm.model_crm_lead2opportunity_partner_mass #: model:ir.model,name:crm.model_crm_lead2opportunity_partner_mass
msgid "Mass Lead To Opportunity Partner" msgid "Mass Lead To Opportunity Partner"
msgstr "" msgstr "Transformación masiva de iniciativa a oportunidad"
#. module: crm #. module: crm
#: view:crm.lead:0 #: view:crm.lead:0
@ -2777,7 +2783,7 @@ msgstr "e-mail del contacto"
#. module: crm #. module: crm
#: field:crm.lead,referred:0 #: field:crm.lead,referred:0
msgid "Referred by" msgid "Referred by"
msgstr "" msgstr "Referido por"
#. module: crm #. module: crm
#: view:crm.lead:0 model:ir.model,name:crm.model_crm_add_note #: view:crm.lead:0 model:ir.model,name:crm.model_crm_add_note
@ -3541,7 +3547,7 @@ msgstr "Nuevas oportunidades"
#: code:addons/crm/crm_action_rule.py:61 #: code:addons/crm/crm_action_rule.py:61
#, python-format #, python-format
msgid "No E-Mail Found for your Company address!" msgid "No E-Mail Found for your Company address!"
msgstr "" msgstr "No se encontró dirección de e-mail para el contacto de su compañía"
#. module: crm #. module: crm
#: field:crm.lead.report,email:0 #: field:crm.lead.report,email:0
@ -3561,7 +3567,7 @@ msgstr "Oportunidades por usuario y equipo"
#. module: crm #. module: crm
#: view:crm.phonecall:0 #: view:crm.phonecall:0
msgid "Reset to Todo" msgid "Reset to Todo"
msgstr "" msgstr "Cambiar a 'Para hacer'"
#. module: crm #. module: crm
#: field:crm.case.section,working_hours:0 #: field:crm.case.section,working_hours:0
@ -3643,6 +3649,10 @@ msgid ""
"partner. From the phone call form, you can trigger a request for another " "partner. From the phone call form, you can trigger a request for another "
"call, a meeting or an opportunity." "call, a meeting or an opportunity."
msgstr "" msgstr ""
"Esta herramienta permite registrar sus llamadas entrantes sobre la marcha. "
"Cada llamada que recibe aparecerá en el formulario de la empresa para trazar "
"cada contacto que tiene con una empresa. Desde el formulario de llamadas, "
"puede lanzar una petición para otra llamada, una reunión u oportunidad."
#. module: crm #. module: crm
#: selection:crm.lead.report,creation_month:0 #: selection:crm.lead.report,creation_month:0
@ -3673,6 +3683,10 @@ msgid ""
"channels that will be maintained at the creation of a document in the " "channels that will be maintained at the creation of a document in the "
"system. Some examples of channels can be: Website, Phone Call, Reseller, etc." "system. Some examples of channels can be: Website, Phone Call, Reseller, etc."
msgstr "" msgstr ""
"Controle el origen de sus iniciativas y oportunidades de venta mediante la "
"creación de canales específicos que se usarán en la creación de documentos "
"en el sistema. Algunos ejemplos de canales son: Sitio web, llamada "
"telefónica, distribuidores, ..."
#. module: crm #. module: crm
#: selection:crm.lead2opportunity.partner,name:0 #: selection:crm.lead2opportunity.partner,name:0
@ -3740,7 +3754,7 @@ msgstr "Año"
#. module: crm #. module: crm
#: constraint:res.partner:0 #: constraint:res.partner:0
msgid "Error ! You cannot create recursive associated members." msgid "Error ! You cannot create recursive associated members."
msgstr "" msgstr "¡Error! No puede crear miembros asociados recursivamente."
#. module: crm #. module: crm
#: model:crm.case.resource.type,name:crm.type_lead8 #: model:crm.case.resource.type,name:crm.type_lead8

View File

@ -91,7 +91,7 @@
<field name="res_model">crm.phonecall.report</field> <field name="res_model">crm.phonecall.report</field>
<field name="view_type">form</field> <field name="view_type">form</field>
<field name="view_mode">tree,graph</field> <field name="view_mode">tree,graph</field>
<field name="context">{"search_default_year":1,"search_default_User":1,"search_default_This Month":1,'group_by_no_leaf':1,'group_by':[]}</field> <field name="context">{"search_default_year":1,"search_default_Salesperson":1,"search_default_This Month":1,'group_by_no_leaf':1,'group_by':[]}</field>
<field name="view_id" ref="view_report_crm_phonecall_tree"/> <field name="view_id" ref="view_report_crm_phonecall_tree"/>
<field name="search_view_id" ref="view_report_crm_phonecall_filter"/> <field name="search_view_id" ref="view_report_crm_phonecall_filter"/>
<field name="help">From this report, you can analyse the performance of your sales team, based on their phone calls. You can group or filter the information according to several criteria and drill down the information, by adding more groups in the report.</field> <field name="help">From this report, you can analyse the performance of your sales team, based on their phone calls. You can group or filter the information according to several criteria and drill down the information, by adding more groups in the report.</field>

View File

@ -175,12 +175,19 @@ class crm_lead2opportunity_mass_convert(osv.osv_memory):
return res return res
def _convert_opportunity(self, cr, uid, ids, vals, context=None): def _convert_opportunity(self, cr, uid, ids, vals, context=None):
"""
When "massively" (more than one at a time) converting leads to
opportunities, check the salesteam_id and salesmen_ids and update
the values before calling super.
"""
if context is None:
context = {}
data = self.browse(cr, uid, ids, context=context)[0] data = self.browse(cr, uid, ids, context=context)[0]
salesteam_id = data.section_id and data.section_id.id or False salesteam_id = data.section_id and data.section_id.id or False
salesman = [] salesmen_ids = []
if data.user_ids: if data.user_ids:
salesman = [x.id for x in data.user_ids] salesmen_ids = [x.id for x in data.user_ids]
vals.update({'user_ids': salesman, 'section_id': salesteam_id}) vals.update({'user_ids': salesmen_ids, 'section_id': salesteam_id})
return super(crm_lead2opportunity_mass_convert, self)._convert_opportunity(cr, uid, ids, vals, context=context) return super(crm_lead2opportunity_mass_convert, self)._convert_opportunity(cr, uid, ids, vals, context=context)
def mass_convert(self, cr, uid, ids, context=None): def mass_convert(self, cr, uid, ids, context=None):

View File

@ -35,7 +35,7 @@ class crm_lead2partner(osv.osv_memory):
} }
def view_init(self, cr, uid, fields, context=None): def view_init(self, cr, uid, fields, context=None):
""" """
This function checks for precondition before wizard executes Check for precondition before wizard executes.
""" """
if context is None: if context is None:
context = {} context = {}
@ -69,22 +69,19 @@ class crm_lead2partner(osv.osv_memory):
return partner_id return partner_id
def default_get(self, cr, uid, fields, context=None): def default_get(self, cr, uid, fields, context=None):
""" res = super(crm_lead2partner, self).default_get(cr, uid, fields, context=context)
This function gets default values
"""
res = super(crm_lead2partner, self).default_get(cr, uid, fields, context=context)
partner_id = self._select_partner(cr, uid, context=context) partner_id = self._select_partner(cr, uid, context=context)
if 'partner_id' in fields: if 'partner_id' in fields:
res.update({'partner_id': partner_id}) res.update({'partner_id': partner_id})
if 'action' in fields: if 'action' in fields:
res.update({'action': partner_id and 'exist' or 'create'}) res.update({'action': partner_id and 'exist' or 'create'})
return res return res
def open_create_partner(self, cr, uid, ids, context=None): def open_create_partner(self, cr, uid, ids, context=None):
""" """
This function Opens form of create partner. Open form of create partner.
""" """
view_obj = self.pool.get('ir.ui.view') view_obj = self.pool.get('ir.ui.view')
view_id = view_obj.search(cr, uid, [('model', '=', self._name), \ view_id = view_obj.search(cr, uid, [('model', '=', self._name), \
@ -101,21 +98,21 @@ class crm_lead2partner(osv.osv_memory):
def _create_partner(self, cr, uid, ids, context=None): def _create_partner(self, cr, uid, ids, context=None):
""" """
This function Creates partner based on action. Create partner based on action.
""" """
if context is None: if context is None:
context = {} context = {}
lead = self.pool.get('crm.lead') lead = self.pool.get('crm.lead')
lead_ids = context and context.get('active_ids') or [] lead_ids = context.get('active_ids', [])
data = self.browse(cr, uid, ids, context=context)[0] data = self.browse(cr, uid, ids, context=context)[0]
partner_id = data.partner_id and data.partner_id.id or False partner_id = data.partner_id and data.partner_id.id or False
return lead.convert_partner(cr, uid, lead_ids, data.action, partner_id, context=context) return lead.convert_partner(cr, uid, lead_ids, data.action, partner_id, context=context)
def make_partner(self, cr, uid, ids, context=None): def make_partner(self, cr, uid, ids, context=None):
""" """
This function Makes partner based on action. Make a partner based on action.
Only called from form view, so only meant to convert one lead at a time.
""" """
# Only called from Form view, so only meant to convert one Lead.
lead_id = context and context.get('active_id') or False lead_id = context and context.get('active_id') or False
partner_ids_map = self._create_partner(cr, uid, ids, context=context) partner_ids_map = self._create_partner(cr, uid, ids, context=context)
return self.pool.get('res.partner').redirect_partner_form(cr, uid, partner_ids_map.get(lead_id, False), context=context) return self.pool.get('res.partner').redirect_partner_form(cr, uid, partner_ids_map.get(lead_id, False), context=context)

View File

@ -105,7 +105,7 @@ class crm_claim(base_stage, osv.osv):
'email_from': fields.char('Email', size=128, help="Destination email for email gateway."), 'email_from': fields.char('Email', size=128, help="Destination email for email gateway."),
'partner_phone': fields.char('Phone', size=32), 'partner_phone': fields.char('Phone', size=32),
'stage_id': fields.many2one ('crm.claim.stage', 'Stage', 'stage_id': fields.many2one ('crm.claim.stage', 'Stage',
domain="['|', ('section_ids', '=', section_id), ('case_default', '=', True)]"), domain="['&',('fold', '=', False),'|', ('section_ids', '=', section_id), ('case_default', '=', True)]"),
'cause': fields.text('Root Cause'), 'cause': fields.text('Root Cause'),
'state': fields.related('stage_id', 'state', type="selection", store=True, 'state': fields.related('stage_id', 'state', type="selection", store=True,
selection=crm.AVAILABLE_STATES, string="Status", readonly=True, selection=crm.AVAILABLE_STATES, string="Status", readonly=True,

View File

@ -43,38 +43,32 @@
--> -->
<record model="crm.claim.stage" id="stage_claim1"> <record model="crm.claim.stage" id="stage_claim1">
<field name="name">Draft claim</field> <field name="name">New</field>
<field name="state">draft</field> <field name="state">draft</field>
<field name="sequence">26</field> <field name="sequence">26</field>
<field name="case_default" eval="True"/> <field name="case_default" eval="True"/>
</record> </record>
<record model="crm.claim.stage" id="stage_claim5"> <record model="crm.claim.stage" id="stage_claim5">
<field name="name">Actions Defined</field> <field name="name">In Progress</field>
<field name="state">open</field> <field name="state">open</field>
<field name="sequence">27</field> <field name="sequence">27</field>
<field name="case_default" eval="True"/> <field name="case_default" eval="True"/>
</record> </record>
<record model="crm.claim.stage" id="stage_claim2"> <record model="crm.claim.stage" id="stage_claim2">
<field name="name">Actions Done</field> <field name="name">Settled</field>
<field name="state">done</field> <field name="state">done</field>
<field name="sequence">28</field> <field name="sequence">28</field>
<field name="case_default" eval="True"/> <field name="case_default" eval="True"/>
</record> </record>
<record model="crm.claim.stage" id="stage_claim3"> <record model="crm.claim.stage" id="stage_claim3">
<field name="name">Refused</field> <field name="name">Rejected</field>
<field name="state">done</field> <field name="state">cancel</field>
<field name="sequence">29</field> <field name="sequence">29</field>
<field name="case_default" eval="True"/> <field name="case_default" eval="True"/>
<field name="case_refused" eval="True"/> <field name="case_refused" eval="True"/>
<field name="fold" eval="True"/> <field name="fold" eval="True"/>
</record> </record>
<record model="crm.claim.stage" id="stage_claim3">
<field name="name">Cancelled</field>
<field name="state">cancel</field>
<field name="sequence">30</field>
<field name="case_default" eval="True"/>
<field name="fold" eval="True"/>
</record>
</data> </data>
</openerp> </openerp>

View File

@ -52,7 +52,7 @@
<!-- Claim Stages --> <!-- Claim Stages -->
<menuitem id="base.menu_definitions" name="Configuration" parent="base.menu_main_pm" sequence="60"/> <menuitem id="base.menu_definitions" name="Configuration" parent="base.menu_main_pm" sequence="60"/>
<menuitem id="base.menu_project_config_project" name="Stages" parent="base.menu_definitions" sequence="1"/> <menuitem id="base.menu_project_config_project" name="Stages" parent="base.menu_definitions" sequence="1"/>
<menuitem id="menu_claim_stage_view" name="Claim Stages" action="crm_claim_stage_act" parent="base.menu_project_config_project" sequence="20"/> <menuitem id="menu_claim_stage_view" name="Stages" action="crm_claim_stage_act" parent="menu_config_claim" sequence="20"/>
</data> </data>
</openerp> </openerp>

View File

@ -102,16 +102,11 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Claim" version="7.0"> <form string="Claim" version="7.0">
<header> <header>
<button name="case_open" string="Open" type="object" class="oe_highlight" <button name="case_close" string="Settle" type="object" class="oe_highlight"
states="draft,pending" groups="base.group_user"/> states="draft,open,pending" groups="base.group_user"/>
<button name="case_close" string="Done" type="object" class="oe_highlight" <button name="case_cancel" string="Reject" type="object" groups="base.group_user"
states="open,pending" groups="base.group_user"/>
<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"/> states="draft,open,pending"/>
<field name="stage_id" widget="statusbar" <field name="stage_id" widget="statusbar" clickable="True"/>
on_change="onchange_stage_id(stage_id)"/>
</header> </header>
<sheet string="Claims"> <sheet string="Claims">
<group> <group>

View File

@ -8,14 +8,14 @@ msgstr ""
"Project-Id-Version: openobject-addons\n" "Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-02-08 00:36+0000\n" "POT-Creation-Date: 2012-02-08 00:36+0000\n"
"PO-Revision-Date: 2011-01-16 17:13+0000\n" "PO-Revision-Date: 2012-11-09 12:10+0000\n"
"Last-Translator: mgaja (GrupoIsep.com) <Unknown>\n" "Last-Translator: Pedro Manuel Baeza <pedro.baeza@gmail.com>\n"
"Language-Team: Spanish <es@li.org>\n" "Language-Team: Spanish <es@li.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-30 05:33+0000\n" "X-Launchpad-Export-Date: 2012-11-10 04:59+0000\n"
"X-Generator: Launchpad (build 16206)\n" "X-Generator: Launchpad (build 16251)\n"
#. module: crm_partner_assign #. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,send_to:0 #: field:crm.lead.forward.to.partner,send_to:0
@ -25,12 +25,12 @@ msgstr "Enviar a"
#. module: crm_partner_assign #. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,subtype:0 #: field:crm.lead.forward.to.partner,subtype:0
msgid "Message type" msgid "Message type"
msgstr "" msgstr "Tipo de mensaje"
#. module: crm_partner_assign #. module: crm_partner_assign
#: help:crm.lead.forward.to.partner,auto_delete:0 #: help:crm.lead.forward.to.partner,auto_delete:0
msgid "Permanently delete emails after sending" msgid "Permanently delete emails after sending"
msgstr "" msgstr "Eliminar permanentemente los emails depués de su envío"
#. module: crm_partner_assign #. module: crm_partner_assign
#: field:crm.lead.report.assign,delay_close:0 #: field:crm.lead.report.assign,delay_close:0
@ -40,7 +40,7 @@ msgstr "Retraso para cerrar"
#. module: crm_partner_assign #. module: crm_partner_assign
#: help:crm.lead.forward.to.partner,email_to:0 #: help:crm.lead.forward.to.partner,email_to:0
msgid "Message recipients" msgid "Message recipients"
msgstr "" msgstr "Destinatarios del mensaje"
#. module: crm_partner_assign #. module: crm_partner_assign
#: field:crm.lead.report.assign,planned_revenue:0 #: field:crm.lead.report.assign,planned_revenue:0
@ -61,7 +61,7 @@ msgstr "Agrupar por..."
#. module: crm_partner_assign #. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,template_id:0 #: field:crm.lead.forward.to.partner,template_id:0
msgid "Template" msgid "Template"
msgstr "" msgstr "Plantilla"
#. module: crm_partner_assign #. module: crm_partner_assign
#: view:crm.lead:0 #: view:crm.lead:0
@ -76,12 +76,12 @@ msgstr "Geo localizar"
#. module: crm_partner_assign #. module: crm_partner_assign
#: help:crm.lead.forward.to.partner,body:0 #: help:crm.lead.forward.to.partner,body:0
msgid "Plain-text version of the message" msgid "Plain-text version of the message"
msgstr "" msgstr "Versión en texto plano del mensaje"
#. module: crm_partner_assign #. module: crm_partner_assign
#: view:crm.lead.forward.to.partner:0 #: view:crm.lead.forward.to.partner:0
msgid "Body" msgid "Body"
msgstr "" msgstr "Cuerpo"
#. module: crm_partner_assign #. module: crm_partner_assign
#: selection:crm.lead.report.assign,month:0 #: selection:crm.lead.report.assign,month:0
@ -101,7 +101,7 @@ msgstr "Demora cierre"
#. module: crm_partner_assign #. module: crm_partner_assign
#: view:crm.partner.report.assign:0 #: view:crm.partner.report.assign:0
msgid "#Partner" msgid "#Partner"
msgstr "" msgstr "Nº empresa"
#. module: crm_partner_assign #. module: crm_partner_assign
#: selection:crm.lead.forward.to.partner,history:0 #: selection:crm.lead.forward.to.partner,history:0
@ -137,7 +137,7 @@ msgstr "Más alta"
#. module: crm_partner_assign #. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,body:0 #: field:crm.lead.forward.to.partner,body:0
msgid "Text contents" msgid "Text contents"
msgstr "" msgstr "Contenido del texto"
#. module: crm_partner_assign #. module: crm_partner_assign
#: view:crm.lead.report.assign:0 #: view:crm.lead.report.assign:0
@ -148,7 +148,7 @@ msgstr "Día"
#. module: crm_partner_assign #. module: crm_partner_assign
#: help:crm.lead.forward.to.partner,message_id:0 #: help:crm.lead.forward.to.partner,message_id:0
msgid "Message unique identifier" msgid "Message unique identifier"
msgstr "" msgstr "Identificador único del mensaje"
#. module: crm_partner_assign #. module: crm_partner_assign
#: selection:crm.lead.forward.to.partner,history:0 #: selection:crm.lead.forward.to.partner,history:0
@ -167,6 +167,8 @@ msgid ""
"Add here all attachments of the current document you want to include in the " "Add here all attachments of the current document you want to include in the "
"Email." "Email."
msgstr "" msgstr ""
"Añada aquí todos los datos adjuntos del documento que quiere incluir en el "
"correo."
#. module: crm_partner_assign #. module: crm_partner_assign
#: selection:crm.lead.report.assign,state:0 #: selection:crm.lead.report.assign,state:0
@ -195,17 +197,17 @@ msgstr ""
#. module: crm_partner_assign #. module: crm_partner_assign
#: help:crm.lead.forward.to.partner,body_html:0 #: help:crm.lead.forward.to.partner,body_html:0
msgid "Rich-text/HTML version of the message" msgid "Rich-text/HTML version of the message"
msgstr "" msgstr "Versión en texto enriquecido / HTML del mensaje"
#. module: crm_partner_assign #. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,auto_delete:0 #: field:crm.lead.forward.to.partner,auto_delete:0
msgid "Auto Delete" msgid "Auto Delete"
msgstr "" msgstr "Auto eliminar"
#. module: crm_partner_assign #. module: crm_partner_assign
#: help:crm.lead.forward.to.partner,email_bcc:0 #: help:crm.lead.forward.to.partner,email_bcc:0
msgid "Blind carbon copy message recipients" msgid "Blind carbon copy message recipients"
msgstr "" msgstr "Destinatarios de la copia oculta"
#. module: crm_partner_assign #. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,partner_id:0 #: field:crm.lead.forward.to.partner,partner_id:0
@ -254,7 +256,7 @@ msgstr "Sección"
#. module: crm_partner_assign #. module: crm_partner_assign
#: view:crm.lead.forward.to.partner:0 #: view:crm.lead.forward.to.partner:0
msgid "Send" msgid "Send"
msgstr "" msgstr "Enviar"
#. module: crm_partner_assign #. module: crm_partner_assign
#: view:res.partner:0 #: view:res.partner:0
@ -286,7 +288,7 @@ msgstr "Tipo"
#. module: crm_partner_assign #. module: crm_partner_assign
#: view:crm.partner.report.assign:0 #: view:crm.partner.report.assign:0
msgid "Name" msgid "Name"
msgstr "" msgstr "Nombre"
#. module: crm_partner_assign #. module: crm_partner_assign
#: selection:crm.lead.report.assign,priority:0 #: selection:crm.lead.report.assign,priority:0
@ -299,11 +301,13 @@ msgid ""
"Type of message, usually 'html' or 'plain', used to select plaintext or rich " "Type of message, usually 'html' or 'plain', used to select plaintext or rich "
"text contents accordingly" "text contents accordingly"
msgstr "" msgstr ""
"Tipo de mensaje, normalmente 'html' o 'plano', utilizado para seleccionar "
"contenidos en texto plano o en texto enriquecido"
#. module: crm_partner_assign #. module: crm_partner_assign
#: view:crm.lead.report.assign:0 #: view:crm.lead.report.assign:0
msgid "Assign Date" msgid "Assign Date"
msgstr "" msgstr "Fecha de asignación"
#. module: crm_partner_assign #. module: crm_partner_assign
#: view:crm.lead.report.assign:0 #: view:crm.lead.report.assign:0
@ -318,7 +322,7 @@ msgstr "Fecha creación"
#. module: crm_partner_assign #. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,res_id:0 #: field:crm.lead.forward.to.partner,res_id:0
msgid "Related Document ID" msgid "Related Document ID"
msgstr "" msgstr "ID del docuemtno relacionado"
#. module: crm_partner_assign #. module: crm_partner_assign
#: view:crm.lead.report.assign:0 #: view:crm.lead.report.assign:0
@ -349,7 +353,7 @@ msgstr "Etapa"
#. module: crm_partner_assign #. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,model:0 #: field:crm.lead.forward.to.partner,model:0
msgid "Related Document model" msgid "Related Document model"
msgstr "" msgstr "Modelo del documento relacionado"
#. module: crm_partner_assign #. module: crm_partner_assign
#: code:addons/crm_partner_assign/wizard/crm_forward_to_partner.py:192 #: code:addons/crm_partner_assign/wizard/crm_forward_to_partner.py:192
@ -392,7 +396,7 @@ msgstr "Cerrar"
#. module: crm_partner_assign #. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,use_template:0 #: field:crm.lead.forward.to.partner,use_template:0
msgid "Use Template" msgid "Use Template"
msgstr "" msgstr "Usar plantilla"
#. module: crm_partner_assign #. module: crm_partner_assign
#: model:ir.actions.act_window,name:crm_partner_assign.action_report_crm_opportunity_assign #: model:ir.actions.act_window,name:crm_partner_assign.action_report_crm_opportunity_assign
@ -464,12 +468,12 @@ msgstr "nº oportunidades"
#. module: crm_partner_assign #. module: crm_partner_assign
#: view:crm.lead:0 #: view:crm.lead:0
msgid "Team" msgid "Team"
msgstr "" msgstr "Equipo"
#. module: crm_partner_assign #. module: crm_partner_assign
#: view:crm.lead:0 #: view:crm.lead:0
msgid "Referred Partner" msgid "Referred Partner"
msgstr "" msgstr "Empresa referida"
#. module: crm_partner_assign #. module: crm_partner_assign
#: selection:crm.lead.report.assign,state:0 #: selection:crm.lead.report.assign,state:0
@ -490,7 +494,7 @@ msgstr "Cerrado"
#. module: crm_partner_assign #. module: crm_partner_assign
#: model:ir.actions.act_window,name:crm_partner_assign.action_crm_send_mass_forward #: model:ir.actions.act_window,name:crm_partner_assign.action_crm_send_mass_forward
msgid "Mass forward to partner" msgid "Mass forward to partner"
msgstr "" msgstr "Envío masivo a empresa"
#. module: crm_partner_assign #. module: crm_partner_assign
#: view:res.partner:0 #: view:res.partner:0
@ -570,7 +574,7 @@ msgstr "Longitud Geo"
#. module: crm_partner_assign #. module: crm_partner_assign
#: field:crm.partner.report.assign,opp:0 #: field:crm.partner.report.assign,opp:0
msgid "# of Opportunity" msgid "# of Opportunity"
msgstr "" msgstr "Nº oportunidad"
#. module: crm_partner_assign #. module: crm_partner_assign
#: view:crm.lead.report.assign:0 #: view:crm.lead.report.assign:0
@ -600,12 +604,12 @@ msgstr "Empresa a la que este caso ha sido reenviado/asignado."
#. module: crm_partner_assign #. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,date:0 #: field:crm.lead.forward.to.partner,date:0
msgid "Date" msgid "Date"
msgstr "" msgstr "Fecha"
#. module: crm_partner_assign #. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,body_html:0 #: field:crm.lead.forward.to.partner,body_html:0
msgid "Rich-text contents" msgid "Rich-text contents"
msgstr "" msgstr "Contenido en texto enriquecido"
#. module: crm_partner_assign #. module: crm_partner_assign
#: view:crm.lead.report.assign:0 #: view:crm.lead.report.assign:0
@ -620,18 +624,18 @@ msgstr "res.empresa.nivel"
#. module: crm_partner_assign #. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,message_id:0 #: field:crm.lead.forward.to.partner,message_id:0
msgid "Message-Id" msgid "Message-Id"
msgstr "" msgstr "Id del mensaje"
#. module: crm_partner_assign #. module: crm_partner_assign
#: view:crm.lead.forward.to.partner:0 #: view:crm.lead.forward.to.partner:0
#: field:crm.lead.forward.to.partner,attachment_ids:0 #: field:crm.lead.forward.to.partner,attachment_ids:0
msgid "Attachments" msgid "Attachments"
msgstr "" msgstr "Adjuntos"
#. module: crm_partner_assign #. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,email_cc:0 #: field:crm.lead.forward.to.partner,email_cc:0
msgid "Cc" msgid "Cc"
msgstr "" msgstr "Cc"
#. module: crm_partner_assign #. module: crm_partner_assign
#: selection:crm.lead.report.assign,month:0 #: selection:crm.lead.report.assign,month:0
@ -641,7 +645,7 @@ msgstr "Septiembre"
#. module: crm_partner_assign #. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,references:0 #: field:crm.lead.forward.to.partner,references:0
msgid "References" msgid "References"
msgstr "" msgstr "Referencias"
#. module: crm_partner_assign #. module: crm_partner_assign
#: view:crm.lead.report.assign:0 #: view:crm.lead.report.assign:0
@ -668,7 +672,7 @@ msgstr "Abierto"
#. module: crm_partner_assign #. module: crm_partner_assign
#: help:crm.lead.forward.to.partner,email_cc:0 #: help:crm.lead.forward.to.partner,email_cc:0
msgid "Carbon copy message recipients" msgid "Carbon copy message recipients"
msgstr "" msgstr "Destinatarios de la copia"
#. module: crm_partner_assign #. module: crm_partner_assign
#: help:crm.lead.forward.to.partner,headers:0 #: help:crm.lead.forward.to.partner,headers:0
@ -676,6 +680,8 @@ msgid ""
"Full message headers, e.g. SMTP session headers (usually available on " "Full message headers, e.g. SMTP session headers (usually available on "
"inbound messages only)" "inbound messages only)"
msgstr "" msgstr ""
"Cabeceras completas del mensaje, por ejemplo las cabeceras de sesión SMTP "
"(normalmente disponibles sólo en mensajes entrantes)"
#. module: crm_partner_assign #. module: crm_partner_assign
#: field:res.partner,date_localization:0 #: field:res.partner,date_localization:0
@ -698,11 +704,13 @@ msgid ""
"Message sender, taken from user preferences. If empty, this is not a mail " "Message sender, taken from user preferences. If empty, this is not a mail "
"but a message." "but a message."
msgstr "" msgstr ""
"Remitente del mensaje, proveniente de las preferencias del usuario. Si está "
"vacío, esto no es correo electrónico, sino un mensaje."
#. module: crm_partner_assign #. module: crm_partner_assign
#: field:crm.partner.report.assign,nbr:0 #: field:crm.partner.report.assign,nbr:0
msgid "# of Partner" msgid "# of Partner"
msgstr "" msgstr "Nº empresa"
#. module: crm_partner_assign #. module: crm_partner_assign
#: view:crm.lead.forward.to.partner:0 #: view:crm.lead.forward.to.partner:0
@ -713,7 +721,7 @@ msgstr "Reenviar a empresa"
#. module: crm_partner_assign #. module: crm_partner_assign
#: field:crm.partner.report.assign,name:0 #: field:crm.partner.report.assign,name:0
msgid "Partner name" msgid "Partner name"
msgstr "" msgstr "Nombre de la empresa"
#. module: crm_partner_assign #. module: crm_partner_assign
#: selection:crm.lead.report.assign,month:0 #: selection:crm.lead.report.assign,month:0
@ -728,7 +736,7 @@ msgstr "Ingreso estimado"
#. module: crm_partner_assign #. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,reply_to:0 #: field:crm.lead.forward.to.partner,reply_to:0
msgid "Reply-To" msgid "Reply-To"
msgstr "" msgstr "Responder a"
#. module: crm_partner_assign #. module: crm_partner_assign
#: field:crm.lead,partner_assigned_id:0 #: field:crm.lead,partner_assigned_id:0
@ -748,7 +756,7 @@ msgstr "Oportunidad"
#. module: crm_partner_assign #. module: crm_partner_assign
#: view:crm.lead.forward.to.partner:0 #: view:crm.lead.forward.to.partner:0
msgid "Send Mail" msgid "Send Mail"
msgstr "" msgstr "Enviar correo"
#. module: crm_partner_assign #. module: crm_partner_assign
#: field:crm.lead.report.assign,partner_id:0 #: field:crm.lead.report.assign,partner_id:0
@ -776,7 +784,7 @@ msgstr "País"
#. module: crm_partner_assign #. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,headers:0 #: field:crm.lead.forward.to.partner,headers:0
msgid "Message headers" msgid "Message headers"
msgstr "" msgstr "Cabeceras del mensaje"
#. module: crm_partner_assign #. module: crm_partner_assign
#: view:res.partner:0 #: view:res.partner:0
@ -786,7 +794,7 @@ msgstr "Convertir en oportunidad"
#. module: crm_partner_assign #. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,email_bcc:0 #: field:crm.lead.forward.to.partner,email_bcc:0
msgid "Bcc" msgid "Bcc"
msgstr "" msgstr "Cco"
#. module: crm_partner_assign #. module: crm_partner_assign
#: view:crm.lead:0 #: view:crm.lead:0
@ -802,7 +810,7 @@ msgstr "Abril"
#: model:ir.actions.act_window,name:crm_partner_assign.action_report_crm_partner_assign #: model:ir.actions.act_window,name:crm_partner_assign.action_report_crm_partner_assign
#: model:ir.ui.menu,name:crm_partner_assign.menu_report_crm_partner_assign_tree #: model:ir.ui.menu,name:crm_partner_assign.menu_report_crm_partner_assign_tree
msgid "Partnership Analysis" msgid "Partnership Analysis"
msgstr "" msgstr "Análisis de la relación"
#. module: crm_partner_assign #. module: crm_partner_assign
#: model:ir.model,name:crm_partner_assign.model_crm_lead #: model:ir.model,name:crm_partner_assign.model_crm_lead
@ -817,7 +825,7 @@ msgstr "Pendiente"
#. module: crm_partner_assign #. module: crm_partner_assign
#: view:crm.partner.report.assign:0 #: view:crm.partner.report.assign:0
msgid "Partner assigned Analysis" msgid "Partner assigned Analysis"
msgstr "" msgstr "Análisis de la empresa asignada"
#. module: crm_partner_assign #. module: crm_partner_assign
#: model:ir.model,name:crm_partner_assign.model_crm_lead_report_assign #: model:ir.model,name:crm_partner_assign.model_crm_lead_report_assign
@ -828,11 +836,12 @@ msgstr "Informe de iniciativas CRM"
#: help:crm.lead.forward.to.partner,references:0 #: help:crm.lead.forward.to.partner,references:0
msgid "Message references, such as identifiers of previous messages" msgid "Message references, such as identifiers of previous messages"
msgstr "" msgstr ""
"Referencias del mensaje, tales como identificadores de mensajes anteriores"
#. module: crm_partner_assign #. module: crm_partner_assign
#: constraint:res.partner:0 #: constraint:res.partner:0
msgid "Error ! You cannot create recursive associated members." msgid "Error ! You cannot create recursive associated members."
msgstr "" msgstr "¡Error! No puede crear miembros asociados recursivamente."
#. module: crm_partner_assign #. module: crm_partner_assign
#: selection:crm.lead.forward.to.partner,history:0 #: selection:crm.lead.forward.to.partner,history:0
@ -847,12 +856,12 @@ msgstr "Secuencia"
#. module: crm_partner_assign #. module: crm_partner_assign
#: model:ir.model,name:crm_partner_assign.model_crm_partner_report_assign #: model:ir.model,name:crm_partner_assign.model_crm_partner_report_assign
msgid "CRM Partner Report" msgid "CRM Partner Report"
msgstr "" msgstr "Informe de la empresa CRM"
#. module: crm_partner_assign #. module: crm_partner_assign
#: model:ir.model,name:crm_partner_assign.model_crm_lead_forward_to_partner #: model:ir.model,name:crm_partner_assign.model_crm_lead_forward_to_partner
msgid "Email composition wizard" msgid "Email composition wizard"
msgstr "" msgstr "Asistente de composición de e-mail"
#. module: crm_partner_assign #. module: crm_partner_assign
#: selection:crm.lead.report.assign,priority:0 #: selection:crm.lead.report.assign,priority:0
@ -873,7 +882,7 @@ msgstr "Fecha de creación"
#. module: crm_partner_assign #. module: crm_partner_assign
#: field:crm.lead.forward.to.partner,filter_id:0 #: field:crm.lead.forward.to.partner,filter_id:0
msgid "Filters" msgid "Filters"
msgstr "" msgstr "Filtros"
#. module: crm_partner_assign #. module: crm_partner_assign
#: view:crm.lead.report.assign:0 #: view:crm.lead.report.assign:0
@ -884,7 +893,7 @@ msgstr "Año"
#. module: crm_partner_assign #. module: crm_partner_assign
#: help:crm.lead.forward.to.partner,reply_to:0 #: help:crm.lead.forward.to.partner,reply_to:0
msgid "Preferred response address for the message" msgid "Preferred response address for the message"
msgstr "" msgstr "Dirección de correo de respuesta preferida para este mensaje"
#~ msgid "Reply-to of the Sales team defined on this case" #~ msgid "Reply-to of the Sales team defined on this case"
#~ msgstr "\"Responder a\" del equipo de ventas definido en este caso" #~ msgstr "\"Responder a\" del equipo de ventas definido en este caso"
@ -941,3 +950,6 @@ msgstr ""
#~ "partners o asesores,\n" #~ "partners o asesores,\n"
#~ "basándose en geo-localización.\n" #~ "basándose en geo-localización.\n"
#~ " " #~ " "
#~ msgid "E-mail composition wizard"
#~ msgstr "Asistente de composición de e-mail"

View File

@ -244,6 +244,7 @@ class crm_segmentation(osv.osv):
@param uid: the current users ID for security checks, @param uid: the current users ID for security checks,
@param ids: List of crm segmentations IDs """ @param ids: List of crm segmentations IDs """
partner_obj = self.pool.get('res.partner')
categs = self.read(cr,uid,ids,['categ_id','exclusif','partner_id', \ categs = self.read(cr,uid,ids,['categ_id','exclusif','partner_id', \
'sales_purchase_active', 'profiling_active']) 'sales_purchase_active', 'profiling_active'])
for categ in categs: for categ in categs:
@ -280,8 +281,10 @@ class crm_segmentation(osv.osv):
for pid in to_remove_list: for pid in to_remove_list:
partners.remove(pid) partners.remove(pid)
for partner_id in partners: for partner in partner_obj.browse(cr, uid, partners):
cr.execute('insert into res_partner_res_partner_category_rel (category_id,partner_id) values (%s,%s)', (categ['categ_id'][0],partner_id)) category_ids = [categ_id.id for categ_id in partner.category_id]
if categ['categ_id'][0] not in category_ids:
cr.execute('insert into res_partner_res_partner_category_rel (category_id,partner_id) values (%s,%s)', (categ['categ_id'][0],partner.id))
self.write(cr, uid, [id], {'state':'not running', 'partner_id':0}) self.write(cr, uid, [id], {'state':'not running', 'partner_id':0})
return True return True

View File

@ -823,6 +823,7 @@ class node_res_dir(node_class):
uid = self.context.uid uid = self.context.uid
ctx = self.context.context.copy() ctx = self.context.context.copy()
ctx.update(self.dctx) ctx.update(self.dctx)
ctx.update(self.context.extra_ctx)
where = [] where = []
if self.domain: if self.domain:
app = safe_eval(self.domain, ctx) app = safe_eval(self.domain, ctx)

View File

@ -272,7 +272,7 @@ class abstracted_fs(object):
if path.startswith('/'): if path.startswith('/'):
path = path[1:] path = path[1:]
p_parts = path.split('/') # hard-code the unix sep here, by spec. p_parts = path.split(os.sep)
assert '..' not in p_parts assert '..' not in p_parts

View File

@ -43,7 +43,7 @@ class showdiff(osv.osv_memory):
elif len(ids) == 1: elif len(ids) == 1:
old = history.browse(cr, uid, ids[0]) old = history.browse(cr, uid, ids[0])
nids = history.search(cr, uid, [('document_id', '=', old.document_id.id)]) nids = history.search(cr, uid, [('page_id', '=', old.page_id.id)])
nids.sort() nids.sort()
diff = history.getDiff(cr, uid, ids[0], nids[-1]) diff = history.getDiff(cr, uid, ids[0], nids[-1])
else: else:

View File

@ -51,9 +51,10 @@ class document_davdir(osv.osv):
# that might be not worth preparing. # that might be not worth preparing.
nctx.extra_ctx['webdav_path'] = '/'+config.get_misc('webdav','vdir','webdav') nctx.extra_ctx['webdav_path'] = '/'+config.get_misc('webdav','vdir','webdav')
usr_obj = self.pool.get('res.users') usr_obj = self.pool.get('res.users')
res = usr_obj.read(cr, uid, uid, ['login']) res = usr_obj.read(cr, uid, uid, ['login','lang'])
if res: if res:
nctx.extra_ctx['username'] = res['login'] nctx.extra_ctx['username'] = res['login']
nctx.extra_ctx['lang'] = res['lang']
# TODO group # TODO group
return return

View File

@ -15,7 +15,7 @@ openerp.edi.EdiView = openerp.web.Widget.extend({
this._super(); this._super();
var self = this; var self = this;
var param = {"db": self.db, "token": self.token}; var param = {"db": self.db, "token": self.token};
return self.rpc('/edi/get_edi_document', param).then(this.on_document_loaded, this.on_document_failed); return self.rpc('/edi/get_edi_document', param).done(this.on_document_loaded).fail(this.on_document_failed);
}, },
on_document_loaded: function(docs){ on_document_loaded: function(docs){
this.doc = docs[0]; this.doc = docs[0];
@ -108,7 +108,7 @@ openerp.edi.EdiView = openerp.web.Widget.extend({
}); });
openerp.edi.edi_view = function (db, token) { openerp.edi.edi_view = function (db, token) {
openerp.session.session_bind().then(function () { openerp.session.session_bind().done(function () {
new openerp.edi.EdiView(null,db,token).appendTo($("body").addClass('openerp')); new openerp.edi.EdiView(null,db,token).appendTo($("body").addClass('openerp'));
}); });
} }
@ -149,11 +149,11 @@ openerp.edi.EdiImport = openerp.web.Widget.extend({
}, },
do_import: function() { do_import: function() {
this.rpc('/edi/import_edi_url', {url: this.url}).then(this.on_imported, this.on_imported_error); this.rpc('/edi/import_edi_url', {url: this.url}).done(this.on_imported).fail(this.on_imported_error);
}, },
on_imported: function(response) { on_imported: function(response) {
if ('action' in response) { if ('action' in response) {
this.rpc("/web/session/save_session_action", {the_action: response.action}).then(function(key) { this.rpc("/web/session/save_session_action", {the_action: response.action}).done(function(key) {
window.location = "/#sa="+encodeURIComponent(key); window.location = "/#sa="+encodeURIComponent(key);
}); });
} }
@ -188,7 +188,7 @@ openerp.edi.EdiImport = openerp.web.Widget.extend({
}); });
openerp.edi.edi_import = function (url) { openerp.edi.edi_import = function (url) {
openerp.session.session_bind().then(function () { openerp.session.session_bind().done(function () {
new openerp.edi.EdiImport(null,url).appendTo($("body").addClass('openerp')); new openerp.edi.EdiImport(null,url).appendTo($("body").addClass('openerp'));
}); });
} }

View File

@ -118,7 +118,8 @@ class email_template(osv.osv):
"of the message"), "of the message"),
'subject': fields.char('Subject', translate=True, help="Subject (placeholders may be used here)",), 'subject': fields.char('Subject', translate=True, help="Subject (placeholders may be used here)",),
'email_from': fields.char('From', help="Sender address (placeholders may be used here)"), 'email_from': fields.char('From', help="Sender address (placeholders may be used here)"),
'email_to': fields.char('To', help="Comma-separated recipient addresses (placeholders may be used here)"), 'email_to': fields.char('To (Emails)', help="Comma-separated recipient addresses (placeholders may be used here)"),
'email_recipients': fields.char('To (Partners)', help="Comma-separated ids of recipient partners (placeholders may be used here)"),
'email_cc': fields.char('Cc', help="Carbon copy recipients (placeholders may be used here)"), 'email_cc': fields.char('Cc', help="Carbon copy recipients (placeholders may be used here)"),
'reply_to': fields.char('Reply-To', help="Preferred response address (placeholders may be used here)"), 'reply_to': fields.char('Reply-To', help="Preferred response address (placeholders may be used here)"),
'mail_server_id': fields.many2one('ir.mail_server', 'Outgoing Mail Server', readonly=False, 'mail_server_id': fields.many2one('ir.mail_server', 'Outgoing Mail Server', readonly=False,
@ -286,7 +287,7 @@ class email_template(osv.osv):
template = self.get_email_template(cr, uid, template_id, res_id, context) template = self.get_email_template(cr, uid, template_id, res_id, context)
values = {} values = {}
for field in ['subject', 'body_html', 'email_from', for field in ['subject', 'body_html', 'email_from',
'email_to', 'email_cc', 'reply_to']: 'email_to', 'email_recipients', 'email_cc', 'reply_to']:
values[field] = self.render_template(cr, uid, getattr(template, field), values[field] = self.render_template(cr, uid, getattr(template, field),
template.model, res_id, context=context) \ template.model, res_id, context=context) \
or False or False

View File

@ -29,7 +29,8 @@
<group> <group>
<group string="Addressing"> <group string="Addressing">
<field name="email_from" required="1"/> <field name="email_from" required="1"/>
<field name="email_to" required="1"/> <field name="email_to"/>
<field name="email_recipients"/>
<field name="email_cc"/> <field name="email_cc"/>
<field name="reply_to"/> <field name="reply_to"/>
<field name="user_signature"/> <field name="user_signature"/>
@ -77,6 +78,7 @@
<field name="subject"/> <field name="subject"/>
<field name="email_from"/> <field name="email_from"/>
<field name="email_to"/> <field name="email_to"/>
<field name="email_recipients"/>
<field name="report_name"/> <field name="report_name"/>
</tree> </tree>
</field> </field>

View File

@ -63,11 +63,16 @@ class test_message_compose(test_mail.TestMailMockups):
# Create template on mail.group, with attachments # Create template on mail.group, with attachments
group_model_id = self.registry('ir.model').search(cr, uid, [('model', '=', 'mail.group')])[0] group_model_id = self.registry('ir.model').search(cr, uid, [('model', '=', 'mail.group')])[0]
email_template = self.registry('email.template') email_template = self.registry('email.template')
email_template_id = email_template.create(cr, uid, {'model_id': group_model_id, email_template_id = email_template.create(cr, uid, {
'name': 'Pigs Template', 'subject': '${object.name}', 'model_id': group_model_id,
'body_html': '${object.description}', 'user_signature': True, 'name': 'Pigs Template',
'subject': '${object.name}',
'body_html': '${object.description}',
'user_signature': True,
'attachment_ids': [(0, 0, _attachments[0]), (0, 0, _attachments[1])], 'attachment_ids': [(0, 0, _attachments[0]), (0, 0, _attachments[1])],
'email_to': 'b@b.b c@c.c', 'email_cc': 'd@d.d'}) 'email_to': 'b@b.b c@c.c',
'email_cc': 'd@d.d'
})
# ---------------------------------------- # ----------------------------------------
# CASE1: comment and save as template # CASE1: comment and save as template
@ -76,9 +81,9 @@ class test_message_compose(test_mail.TestMailMockups):
# 1. Comment on pigs # 1. Comment on pigs
compose_id = mail_compose.create(cr, uid, compose_id = mail_compose.create(cr, uid,
{'subject': 'Forget me subject', 'body': '<p>Dummy body</p>'}, {'subject': 'Forget me subject', 'body': '<p>Dummy body</p>'},
{'default_composition_mode': 'comment', 'default_model': 'mail.group', {'default_composition_mode': 'comment',
'default_model': 'mail.group',
'default_res_id': self.group_pigs_id, 'default_res_id': self.group_pigs_id,
'default_template_id': email_template_id,
'active_ids': [self.group_pigs_id, self.group_bird_id]}) 'active_ids': [self.group_pigs_id, self.group_bird_id]})
compose = mail_compose.browse(cr, uid, compose_id) compose = mail_compose.browse(cr, uid, compose_id)
@ -97,8 +102,10 @@ class test_message_compose(test_mail.TestMailMockups):
# 1. Comment on pigs # 1. Comment on pigs
compose_id = mail_compose.create(cr, uid, compose_id = mail_compose.create(cr, uid,
{'subject': 'Forget me subject', 'body': 'Dummy body'}, {'subject': 'Forget me subject', 'body': 'Dummy body'},
{'default_composition_mode': 'comment', 'default_model': 'mail.group', {'default_composition_mode': 'comment',
'default_model': 'mail.group',
'default_res_id': self.group_pigs_id, 'default_res_id': self.group_pigs_id,
'default_use_template': False,
'default_template_id': email_template_id, 'default_template_id': email_template_id,
'active_ids': [self.group_pigs_id, self.group_bird_id]}) 'active_ids': [self.group_pigs_id, self.group_bird_id]})
compose = mail_compose.browse(cr, uid, compose_id) compose = mail_compose.browse(cr, uid, compose_id)
@ -135,8 +142,10 @@ class test_message_compose(test_mail.TestMailMockups):
# 1. Mass_mail on pigs and bird, with a default_partner_ids set to check he is correctly added # 1. Mass_mail on pigs and bird, with a default_partner_ids set to check he is correctly added
compose_id = mail_compose.create(cr, uid, compose_id = mail_compose.create(cr, uid,
{'subject': 'Forget me subject', 'body': 'Dummy body'}, {'subject': 'Forget me subject', 'body': 'Dummy body'},
{'default_composition_mode': 'mass_mail', 'default_model': 'mail.group', {'default_composition_mode': 'mass_mail',
'default_model': 'mail.group',
'default_res_id': self.group_pigs_id, 'default_res_id': self.group_pigs_id,
'default_use_template': False,
'default_template_id': email_template_id, 'default_template_id': email_template_id,
'default_partner_ids': [p_a_id], 'default_partner_ids': [p_a_id],
'active_ids': [self.group_pigs_id, self.group_bird_id]}) 'active_ids': [self.group_pigs_id, self.group_bird_id]})
@ -170,3 +179,26 @@ class test_message_compose(test_mail.TestMailMockups):
partner_ids = self.res_partner.search(cr, uid, [('email', 'in', ['b@b.b', 'c@c.c', 'd@d.d'])]) partner_ids = self.res_partner.search(cr, uid, [('email', 'in', ['b@b.b', 'c@c.c', 'd@d.d'])])
self.assertEqual(set(message_pigs_pids), set(partner_ids), 'mail.message on pigs incorrect number of notified_partner_ids') self.assertEqual(set(message_pigs_pids), set(partner_ids), 'mail.message on pigs incorrect number of notified_partner_ids')
self.assertEqual(set(message_bird_pids), set(partner_ids), 'mail.message on bird notified_partner_ids incorrect') self.assertEqual(set(message_bird_pids), set(partner_ids), 'mail.message on bird notified_partner_ids incorrect')
# ----------------------------------------
# CASE4: test newly introduced email_recipients field
# ----------------------------------------
# get already-created partners back
p_b_id = self.res_partner.search(cr, uid, [('email', '=', 'b@b.b')])[0]
p_c_id = self.res_partner.search(cr, uid, [('email', '=', 'c@c.c')])[0]
p_d_id = self.res_partner.search(cr, uid, [('email', '=', 'd@d.d')])[0]
# modify template: use email_recipients, use template and email address in email_to to test all features together
user_model_id = self.registry('ir.model').search(cr, uid, [('model', '=', 'res.users')])[0]
email_template.write(cr, uid, [email_template_id], {
'model_id': user_model_id,
'body_html': '${object.login}',
'email_to': '${object.email} c@c',
'email_recipients': '%i,%i' % (p_b_id, p_c_id),
'email_cc': 'd@d',
})
# patner by email + partner by id (no double)
send_to = [p_a_id, p_b_id, p_c_id, p_d_id]
# Generate messsage with default email and partner on template
mail_value = mail_compose.generate_email_for_composer(cr, uid, email_template_id, uid)
self.assertEqual(set(mail_value['partner_ids']), set(send_to), 'mail.message partner_ids list created by template is incorrect')

View File

@ -17,6 +17,7 @@
<group> <group>
<field name="email_from" readonly="1"/> <field name="email_from" readonly="1"/>
<field name="email_to" readonly="1"/> <field name="email_to" readonly="1"/>
<field name="email_recipients" readonly="1"/>
<field name="email_cc" readonly="1" attrs="{'invisible':[('email_cc','=',False)]}"/> <field name="email_cc" readonly="1" attrs="{'invisible':[('email_cc','=',False)]}"/>
<field name="reply_to" readonly="1" attrs="{'invisible':[('reply_to','=',False)]}"/> <field name="reply_to" readonly="1" attrs="{'invisible':[('reply_to','=',False)]}"/>
<field name="subject" readonly="1"/> <field name="subject" readonly="1"/>

View File

@ -52,8 +52,9 @@ class mail_compose_message(osv.TransientModel):
context = {} context = {}
result = super(mail_compose_message, self).default_get(cr, uid, fields, context=context) result = super(mail_compose_message, self).default_get(cr, uid, fields, context=context)
result['template_id'] = context.get('default_template_id', context.get('mail.compose.template_id', False)) result['template_id'] = context.get('default_template_id', context.get('mail.compose.template_id', False))
# pre-render the template if any # pre-render the template if any
if result.get('use_template'): if result.get('use_template') and result.get('template_id'):
onchange_res = self.onchange_use_template(cr, uid, [], result.get('use_template'), result.get('template_id'), onchange_res = self.onchange_use_template(cr, uid, [], result.get('use_template'), result.get('template_id'),
result.get('composition_mode'), result.get('model'), result.get('res_id'), context=context) result.get('composition_mode'), result.get('model'), result.get('res_id'), context=context)
result.update(onchange_res['value']) result.update(onchange_res['value'])
@ -65,6 +66,10 @@ class mail_compose_message(osv.TransientModel):
'template_id': fields.selection(_get_templates, 'Template', size=-1), 'template_id': fields.selection(_get_templates, 'Template', size=-1),
} }
_defaults = {
'use_template': True,
}
def onchange_template_id(self, cr, uid, ids, use_template, template_id, composition_mode, model, res_id, context=None): def onchange_template_id(self, cr, uid, ids, use_template, template_id, composition_mode, model, res_id, context=None):
""" - use_template not set: return default_get """ - use_template not set: return default_get
- use_template set in mass_mailing: we cannot render, so return the template values - use_template set in mass_mailing: we cannot render, so return the template values
@ -148,15 +153,23 @@ class mail_compose_message(osv.TransientModel):
mail.compose.message, transform email_cc and email_to into partner_ids """ mail.compose.message, transform email_cc and email_to into partner_ids """
template_values = self.pool.get('email.template').generate_email(cr, uid, template_id, res_id, context=context) template_values = self.pool.get('email.template').generate_email(cr, uid, template_id, res_id, context=context)
# filter template values # filter template values
fields = ['body', 'body_html', 'subject', 'email_to', 'email_cc', 'attachments'] fields = ['body', 'body_html', 'subject', 'email_to', 'email_recipients', 'email_cc', 'attachments']
values = dict((field, template_values[field]) for field in fields if template_values.get(field)) values = dict((field, template_values[field]) for field in fields if template_values.get(field))
values['body'] = values.pop('body_html', '') values['body'] = values.pop('body_html', '')
# transform email_to, email_cc into partner_ids # transform email_to, email_cc into partner_ids
values['partner_ids'] = [] values['partner_ids'] = []
mails = tools.email_split(values.pop('email_to', '') + ' ' + values.pop('email_cc', '')) mails = tools.email_split(values.pop('email_to', '') + ' ' + values.pop('email_cc', ''))
for mail in mails: for mail in mails:
partner_id = self.pool.get('res.partner').find_or_create(cr, uid, mail, context=context) partner_id = self.pool.get('res.partner').find_or_create(cr, uid, mail, context=context)
values['partner_ids'].append(partner_id) values['partner_ids'].append(partner_id)
email_recipients = values.pop('email_recipients', '')
if email_recipients:
for partner_id in email_recipients.split(','):
values['partner_ids'].append(int(partner_id))
values['partner_ids'] = list(set(values['partner_ids']))
return values return values
def render_message(self, cr, uid, wizard, res_id, context=None): def render_message(self, cr, uid, wizard, res_id, context=None):

View File

@ -8,23 +8,23 @@
<field name="inherit_id" ref="mail.email_compose_message_wizard_form"/> <field name="inherit_id" ref="mail.email_compose_message_wizard_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<data> <data>
<xpath expr="//form/group" position="after"> <xpath expr="//field[@name='content_subtype']" position="after">
<group attrs="{'invisible':[('use_template','=',False)]}"> <field name="use_template" invisible="1"
<field name="use_template" invisible="1" on_change="onchange_use_template(use_template, template_id, composition_mode, model, res_id, context)"/>
on_change="onchange_use_template(use_template, template_id, composition_mode, model, res_id, context)"/>
<field name="template_id"
on_change="onchange_template_id(use_template, template_id, composition_mode, model, res_id, context)"/>
</group>
</xpath> </xpath>
<xpath expr="//form/footer/button" position="after"> <xpath expr="//footer" position="inside">
<button icon="/email_template/static/src/img/email_template.png" <group class="oe_right" col="1">
type="object" name="toggle_template" string="" <div>Use template
help="Use a message template" <field name="template_id" attrs="{'invisible':[('use_template','=',False)]}"
attrs="{'invisible':[('content_subtype','!=','html')]}"/> nolabel="1"
<button icon="/email_template/static/src/img/email_template_save.png" on_change="onchange_template_id(use_template, template_id, composition_mode, model, res_id, context)"/>
type="object" name="save_as_template" string="" </div>
help="Save as a new template" or
attrs="{'invisible':[('content_subtype','!=','html')]}"/> <button icon="/email_template/static/src/img/email_template_save.png"
type="object" name="save_as_template" string="Save as new template" class="oe_link"
help="Save as a new template"
attrs="{'invisible':[('content_subtype','!=','html')]}"/>
</group>
</xpath> </xpath>
</data> </data>
</field> </field>

View File

@ -510,7 +510,7 @@
<field name="model">event.registration</field> <field name="model">event.registration</field>
<field name="arch" type="xml"> <field name="arch" type="xml">
<search string="Event Registration"> <search string="Event Registration">
<field name="name" string="Participant" filter_domain="['|','|','|',('name','ilike',self),('partner_id','ilike',self),('email','ilike',self),('origin','ilike',self)]"/> <field name="name" string="Participant" filter_domain="['|','|',('name','ilike',self),('email','ilike',self),('origin','ilike',self)]"/>
<filter icon="terp-mail-message-new" string="Unread Messages" name="message_unread" domain="[('message_unread','=',True)]"/> <filter icon="terp-mail-message-new" string="Unread Messages" name="message_unread" domain="[('message_unread','=',True)]"/>
<separator/> <separator/>
<filter icon="terp-check" string="New" name="draft" domain="[('state','=','draft')]" help="Registrations in unconfirmed state"/> <filter icon="terp-check" string="New" name="draft" domain="[('state','=','draft')]" help="Registrations in unconfirmed state"/>
@ -519,6 +519,7 @@
<filter icon="terp-personal" string="My Registrations" help="My Registrations" domain="[('user_id','=',uid)]"/> <filter icon="terp-personal" string="My Registrations" help="My Registrations" domain="[('user_id','=',uid)]"/>
<field name="event_id"/> <field name="event_id"/>
<field name="user_id"/> <field name="user_id"/>
<field name="partner_id"/>
<group expand="0" string="Group By..."> <group expand="0" string="Group By...">
<filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/> <filter string="Responsible" icon="terp-personal" domain="[]" context="{'group_by':'user_id'}"/>
<filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/> <filter string="Partner" icon="terp-partner" domain="[]" context="{'group_by':'partner_id'}"/>

View File

@ -39,7 +39,7 @@ class sale_order_line(osv.osv):
_columns = { _columns = {
'event_id': fields.many2one('event.event', 'Event', help="Choose an event and it will automatically create a registration for this event."), '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 #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_type_id': fields.related('product_id','event_type_id', type='many2one', relation="event.type", string="Event Type"),
'event_ok': fields.related('product_id', 'event_ok', string='event_ok', type='boolean'), 'event_ok': fields.related('product_id', 'event_ok', string='event_ok', type='boolean'),
} }

View File

@ -16,9 +16,9 @@ var _t = instance.web._t,
var view = self.getParent(); var view = self.getParent();
var ids = ( view.fields_view.type != "form" )? view.groups.get_selection().ids : [ view.datarecord.id ]; var ids = ( view.fields_view.type != "form" )? view.groups.get_selection().ids : [ view.datarecord.id ];
if( !_.isEmpty(ids) ){ if( !_.isEmpty(ids) ){
view.sidebar_context().then(function (context) { view.sidebar_context().done(function (context) {
var ds = new instance.web.DataSet(this, 'ir.attachment', context); var ds = new instance.web.DataSet(this, 'ir.attachment', context);
ds.call('google_doc_get', [view.dataset.model, ids, context]).then(function(r) { ds.call('google_doc_get', [view.dataset.model, ids, context]).done(function(r) {
if (r == 'False') { if (r == 'False') {
var params = { var params = {
error: response, error: response,

View File

@ -288,7 +288,7 @@
</record> </record>
<record id="open_view_categ_form" model="ir.actions.act_window"> <record id="open_view_categ_form" model="ir.actions.act_window">
<field name="name">Categories of Employee</field> <field name="name">Categories of Employees</field>
<field name="res_model">hr.employee.category</field> <field name="res_model">hr.employee.category</field>
<field name="view_type">form</field> <field name="view_type">form</field>
<field name="view_mode">tree,form</field> <field name="view_mode">tree,form</field>
@ -342,8 +342,8 @@
<group> <group>
<group> <group>
<field name="no_of_employee" groups="base.group_user"/> <field name="no_of_employee" groups="base.group_user"/>
<field name="expected_employees" groups="base.group_user"/>
<field name="no_of_recruitment" on_change="on_change_expected_employee(no_of_recruitment,no_of_employee)"/> <field name="no_of_recruitment" on_change="on_change_expected_employee(no_of_recruitment,no_of_employee)"/>
<field name="expected_employees" groups="base.group_user"/>
</group> </group>
<group> <group>
<field name="company_id" widget="selection" groups="base.group_multi_company"/> <field name="company_id" widget="selection" groups="base.group_multi_company"/>

View File

@ -8,15 +8,14 @@ msgstr ""
"Project-Id-Version: openobject-addons\n" "Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n" "Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-02-08 01:37+0100\n" "POT-Creation-Date: 2012-02-08 01:37+0100\n"
"PO-Revision-Date: 2012-01-03 02:55+0000\n" "PO-Revision-Date: 2012-11-10 17:20+0000\n"
"Last-Translator: Christopher Ormaza - (Ecuadorenlinea.net) " "Last-Translator: Cristian Salamea (Gnuthink) <ovnicraft@gmail.com>\n"
"<chris.ormaza@gmail.com>\n"
"Language-Team: Spanish (Ecuador) <es_EC@li.org>\n" "Language-Team: Spanish (Ecuador) <es_EC@li.org>\n"
"MIME-Version: 1.0\n" "MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-10-30 05:17+0000\n" "X-Launchpad-Export-Date: 2012-11-11 04:57+0000\n"
"X-Generator: Launchpad (build 16206)\n" "X-Generator: Launchpad (build 16251)\n"
#. module: hr #. module: hr
#: model:process.node,name:hr.process_node_openerpuser0 #: model:process.node,name:hr.process_node_openerpuser0
@ -199,6 +198,8 @@ msgstr "Mujer"
msgid "" msgid ""
"Expected number of employees for this job position after new recruitment." "Expected number of employees for this job position after new recruitment."
msgstr "" msgstr ""
"Número de Empleados para este puesto de trabajo después de las nuevas "
"contrataciones"
#. module: hr #. module: hr
#: model:ir.ui.menu,name:hr.menu_open_view_attendance_reason_new_config #: model:ir.ui.menu,name:hr.menu_open_view_attendance_reason_new_config
@ -291,7 +292,7 @@ msgstr "Categorías"
#. module: hr #. module: hr
#: field:hr.job,expected_employees:0 #: field:hr.job,expected_employees:0
msgid "Total Employees" msgid "Total Employees"
msgstr "" msgstr "Total de Empleados"
#. module: hr #. module: hr
#: selection:hr.employee,marital:0 #: selection:hr.employee,marital:0
@ -435,7 +436,7 @@ msgstr "Estado"
#: model:ir.actions.act_window,name:hr.open_view_categ_tree #: model:ir.actions.act_window,name:hr.open_view_categ_tree
#: model:ir.ui.menu,name:hr.menu_view_employee_category_tree #: model:ir.ui.menu,name:hr.menu_view_employee_category_tree
msgid "Categories Structure" msgid "Categories Structure"
msgstr "" msgstr "Estructura de categorías"
#. module: hr #. module: hr
#: field:hr.employee,partner_id:0 #: field:hr.employee,partner_id:0
@ -465,7 +466,7 @@ msgstr "¡Error! No se puede crear una jerarquía recursiva de empleados."
#. module: hr #. module: hr
#: model:ir.actions.act_window,name:hr.action2 #: model:ir.actions.act_window,name:hr.action2
msgid "Subordinate Hierarchy" msgid "Subordinate Hierarchy"
msgstr "" msgstr "Jerarquía subirdinada"
#. module: hr #. module: hr
#: model:ir.actions.act_window,help:hr.view_department_form_installer #: model:ir.actions.act_window,help:hr.view_department_form_installer
@ -715,12 +716,12 @@ msgstr "Subordinados"
#. module: hr #. module: hr
#: field:hr.job,no_of_employee:0 #: field:hr.job,no_of_employee:0
msgid "Number of employees currently occupying this job position." msgid "Number of employees currently occupying this job position."
msgstr "" msgstr "Número de empleados ocupando actualmente este puesto de trabajo"
#. module: hr #. module: hr
#: field:hr.job,no_of_recruitment:0 #: field:hr.job,no_of_recruitment:0
msgid "Number of new employees you expect to recruit." msgid "Number of new employees you expect to recruit."
msgstr "" msgstr "Número de empleados que espera contratar"
#~ msgid "Working Time Categories" #~ msgid "Working Time Categories"
#~ msgstr "Categorías de Horarios de Trabajo" #~ msgstr "Categorías de Horarios de Trabajo"

View File

@ -31,6 +31,7 @@ from report.interface import toxml
from report import report_sxw from report import report_sxw
from tools import ustr from tools import ustr
from tools.translate import _ from tools.translate import _
from tools import to_xml
one_day = relativedelta(days=1) one_day = relativedelta(days=1)
month2name = [0, 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'] month2name = [0, 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
@ -111,7 +112,7 @@ class report_custom(report_rml):
<date>%s</date> <date>%s</date>
<company>%s</company> <company>%s</company>
</header> </header>
''' % (str(rml_obj.formatLang(time.strftime("%Y-%m-%d"),date=True))+' ' + str(time.strftime("%H:%M")),pooler.get_pool(cr.dbname).get('res.users').browse(cr,uid,uid).company_id.name) ''' % (str(rml_obj.formatLang(time.strftime("%Y-%m-%d"),date=True))+' ' + str(time.strftime("%H:%M")),to_xml(pooler.get_pool(cr.dbname).get('res.users').browse(cr,uid,uid).company_id.name))
first_date = str(month) first_date = str(month)
som = datetime.strptime(first_date, '%Y-%m-%d %H:%M:%S') som = datetime.strptime(first_date, '%Y-%m-%d %H:%M:%S')

View File

@ -57,7 +57,7 @@ openerp.hr_attendance = function (instance) {
var employee = new instance.web.DataSetSearch(self, 'hr.employee', self.session.user_context, [ var employee = new instance.web.DataSetSearch(self, 'hr.employee', self.session.user_context, [
['user_id', '=', self.session.uid] ['user_id', '=', self.session.uid]
]); ]);
return employee.read_slice(['id', 'name', 'state', 'last_sign', 'attendance_access']).pipe(function (res) { return employee.read_slice(['id', 'name', 'state', 'last_sign', 'attendance_access']).then(function (res) {
if (_.isEmpty(res) ) if (_.isEmpty(res) )
return; return;
if (res[0].attendance_access == false){ if (res[0].attendance_access == false){
@ -75,7 +75,7 @@ openerp.hr_attendance = function (instance) {
do_update: function () { do_update: function () {
this._super(); this._super();
var self = this; var self = this;
this.update_promise = this.update_promise.then(function () { this.update_promise = this.update_promise.done(function () {
if (self.attendanceslider) if (self.attendanceslider)
return; return;
self.attendanceslider = new instance.hr_attendance.AttendanceSlider(self); self.attendanceslider = new instance.hr_attendance.AttendanceSlider(self);

View File

@ -291,6 +291,7 @@ survey_request()
class hr_evaluation_interview(osv.osv): class hr_evaluation_interview(osv.osv):
_name = 'hr.evaluation.interview' _name = 'hr.evaluation.interview'
_inherits = {'survey.request': 'request_id'} _inherits = {'survey.request': 'request_id'}
_inherit = 'mail.thread'
_rec_name = 'request_id' _rec_name = 'request_id'
_description = 'Appraisal Interview' _description = 'Appraisal Interview'
_columns = { _columns = {

View File

@ -266,7 +266,7 @@
Each employee may be assigned an Appraisal Plan. Such a plan Each employee may be assigned an Appraisal Plan. Such a plan
defines the frequency and the way you manage your periodic defines the frequency and the way you manage your periodic
personnel evaluation. You will be able to define steps and personnel evaluation. You will be able to define steps and
attach interviews to each step. OpenERP manages all kind of attach interviews to each step. OpenERP manages all kinds of
evaluations: bottom-up, top-down, self-evaluation and final evaluations: bottom-up, top-down, self-evaluation and final
evaluation by the manager. evaluation by the manager.
</p> </p>

View File

@ -64,22 +64,22 @@ class hr_expense_expense(osv.osv):
_description = "Expense" _description = "Expense"
_order = "id desc" _order = "id desc"
_columns = { _columns = {
'name': fields.char('Description', size=128), 'name': fields.char('Description', size=128, required=True, readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}),
'id': fields.integer('Sheet ID', readonly=True), 'id': fields.integer('Sheet ID', readonly=True),
'date': fields.date('Date', select=True), 'date': fields.date('Date', select=True, readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}),
'journal_id': fields.many2one('account.journal', 'Force Journal', help = "The journal used when the expense is done."), 'journal_id': fields.many2one('account.journal', 'Force Journal', help = "The journal used when the expense is done."),
'employee_id': fields.many2one('hr.employee', "Employee", required=True), 'employee_id': fields.many2one('hr.employee', "Employee", required=True, readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}),
'user_id': fields.many2one('res.users', 'User', required=True), 'user_id': fields.many2one('res.users', 'User', required=True),
'date_confirm': fields.date('Confirmation Date', select=True, help="Date of the confirmation of the sheet expense. It's filled when the button Confirm is pressed."), 'date_confirm': fields.date('Confirmation Date', select=True, help="Date of the confirmation of the sheet expense. It's filled when the button Confirm is pressed."),
'date_valid': fields.date('Validation Date', select=True, help="Date of the acceptation of the sheet expense. It's filled when the button Accept is pressed."), 'date_valid': fields.date('Validation Date', select=True, help="Date of the acceptation of the sheet expense. It's filled when the button Accept is pressed."),
'user_valid': fields.many2one('res.users', 'Validation By'), 'user_valid': fields.many2one('res.users', 'Validation By', readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}),
'account_move_id': fields.many2one('account.move', 'Ledger Posting'), 'account_move_id': fields.many2one('account.move', 'Ledger Posting'),
'line_ids': fields.one2many('hr.expense.line', 'expense_id', 'Expense Lines', readonly=True, states={'draft':[('readonly',False)]} ), 'line_ids': fields.one2many('hr.expense.line', 'expense_id', 'Expense Lines', readonly=True, states={'draft':[('readonly',False)]} ),
'note': fields.text('Note'), 'note': fields.text('Note'),
'amount': fields.function(_amount, string='Total Amount', digits_compute= dp.get_precision('Account')), 'amount': fields.function(_amount, string='Total Amount', digits_compute= dp.get_precision('Account')),
'voucher_id': fields.many2one('account.voucher', "Employee's Receipt"), 'voucher_id': fields.many2one('account.voucher', "Employee's Receipt"),
'currency_id': fields.many2one('res.currency', 'Currency', required=True), 'currency_id': fields.many2one('res.currency', 'Currency', required=True, readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}),
'department_id':fields.many2one('hr.department','Department'), 'department_id':fields.many2one('hr.department','Department', readonly=True, states={'draft':[('readonly',False)], 'confirm':[('readonly',False)]}),
'company_id': fields.many2one('res.company', 'Company', required=True), 'company_id': fields.many2one('res.company', 'Company', required=True),
'state': fields.selection([ 'state': fields.selection([
('draft', 'New'), ('draft', 'New'),
@ -100,6 +100,12 @@ class hr_expense_expense(osv.osv):
'currency_id': _get_currency, 'currency_id': _get_currency,
} }
def unlink(self, cr, uid, ids, context=None):
for rec in self.browse(cr, uid, ids, context=context):
if rec.state != 'draft':
raise osv.except_osv(_('Warning!'),_('You can only delete draft expenses!'))
return super(hr_expense_expense, self).unlink(cr, uid, ids, context)
def onchange_currency_id(self, cr, uid, ids, currency_id=False, company_id=False, context=None): def onchange_currency_id(self, cr, uid, ids, currency_id=False, company_id=False, context=None):
res = {'value': {'journal_id': False}} res = {'value': {'journal_id': False}}
journal_ids = self.pool.get('account.journal').search(cr, uid, [('type','=','purchase'), ('currency','=',currency_id), ('company_id', '=', company_id)], context=context) journal_ids = self.pool.get('account.journal').search(cr, uid, [('type','=','purchase'), ('currency','=',currency_id), ('company_id', '=', company_id)], context=context)
@ -236,16 +242,6 @@ class product_product(osv.osv):
'hr_expense_ok': fields.boolean('Can be Expensed', help="Specify if the product can be selected in an HR expense line."), 'hr_expense_ok': fields.boolean('Can be Expensed', help="Specify if the product can be selected in an HR expense line."),
} }
def on_change_hr_expense_ok(self, cr, uid, id, hr_expense_ok):
if not hr_expense_ok:
return {}
data_obj = self.pool.get('ir.model.data')
cat_id = data_obj._get_id(cr, uid, 'hr_expense', 'cat_expense')
categ_id = data_obj.browse(cr, uid, cat_id).res_id
res = {'value' : {'type':'service','sale_ok' :False,'categ_id':categ_id }}
return res
product_product() product_product()
class hr_expense_line(osv.osv): class hr_expense_line(osv.osv):

View File

@ -195,7 +195,7 @@
<field name="inherit_id" ref="product.product_normal_form_view"/> <field name="inherit_id" ref="product.product_normal_form_view"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<div name="options" position="inside"> <div name="options" position="inside">
<field name="hr_expense_ok" on_change="on_change_hr_expense_ok(hr_expense_ok)"/> <field name="hr_expense_ok"/>
<label for="hr_expense_ok"/> <label for="hr_expense_ok"/>
</div> </div>
</field> </field>

View File

@ -90,6 +90,18 @@ class hr_holidays_status(osv.osv):
'color_name': 'red', 'color_name': 'red',
'active': True, 'active': True,
} }
def name_get(self, cr, uid, ids, context=None):
if not ids:
return []
res = []
for record in self.browse(cr, uid, ids, context=context):
name = record.name
if not record.limit:
name = name + (' (%d/%d)' % (record.leaves_taken or 0.0, record.max_leaves or 0.0))
res.append((record.id, name))
return res
hr_holidays_status() hr_holidays_status()
class hr_holidays(osv.osv): class hr_holidays(osv.osv):
@ -113,6 +125,13 @@ class hr_holidays(osv.osv):
result[hol.id] = hol.number_of_days_temp result[hol.id] = hol.number_of_days_temp
return result return result
def _check_date(self, cr, uid, ids):
for holiday in self.browse(cr, uid, ids):
holiday_ids = self.search(cr, uid, [('date_from', '<=', holiday.date_to), ('date_to', '>=', holiday.date_from), ('employee_id', '=', holiday.employee_id.id), ('id', '<>', holiday.id)])
if holiday_ids:
return False
return True
_columns = { _columns = {
'name': fields.char('Description', size=64), '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': fields.selection([('draft', 'To Submit'), ('cancel', 'Cancelled'),('confirm', 'To Approve'), ('refuse', 'Refused'), ('validate1', 'Second Approval'), ('validate', 'Approved')],
@ -146,6 +165,10 @@ class hr_holidays(osv.osv):
'user_id': lambda obj, cr, uid, context: uid, 'user_id': lambda obj, cr, uid, context: uid,
'holiday_type': 'employee' 'holiday_type': 'employee'
} }
_constraints = [
(_check_date, 'You can not have 2 leaves that overlaps on same day!', ['date_from','date_to']),
]
_sql_constraints = [ _sql_constraints = [
('type_value', "CHECK( (holiday_type='employee' AND employee_id IS NOT NULL) or (holiday_type='category' AND category_id IS NOT NULL))", "The employee or employee category of this request is missing."), ('type_value', "CHECK( (holiday_type='employee' AND employee_id IS NOT NULL) or (holiday_type='category' AND category_id IS NOT NULL))", "The employee or employee category of this request is missing."),
('date_check2', "CHECK ( (type='add') OR (date_from <= date_to))", "The start date must be anterior to the end date."), ('date_check2', "CHECK ( (type='add') OR (date_from <= date_to))", "The start date must be anterior to the end date."),
@ -252,6 +275,13 @@ class hr_holidays(osv.osv):
result['value']['number_of_days_temp'] = 0 result['value']['number_of_days_temp'] = 0
return result return result
def write(self, cr, uid, ids, vals, context=None):
check_fnct = self.pool.get('hr.holidays.status').check_access_rights
for holiday in self.browse(cr, uid, ids, context=context):
if holiday.state in ('validate','validate1') and not check_fnct(cr, uid, 'write', raise_exception=False):
raise osv.except_osv(_('Warning!'),_('You cannot modify a leave request that has been approved. Contact a human resource manager.'))
return super(hr_holidays, self).write(cr, uid, ids, vals, context=context)
def set_to_draft(self, cr, uid, ids, context=None): def set_to_draft(self, cr, uid, ids, context=None):
self.write(cr, uid, ids, { self.write(cr, uid, ids, {

View File

@ -34,8 +34,8 @@
<record model="hr.holidays" id="hr_holidays_employee1_vc"> <record model="hr.holidays" id="hr_holidays_employee1_vc">
<field name="name">Summer Vacation</field> <field name="name">Summer Vacation</field>
<field name="holiday_status_id" ref="holiday_status_unpaid"/> <field name="holiday_status_id" ref="holiday_status_unpaid"/>
<field eval="time.strftime('%Y-%m-20')" name="date_from"/> <field eval="time.strftime('%Y-%m-23')" name="date_from"/>
<field eval="time.strftime('%Y-%m-22')" name="date_to"/> <field eval="time.strftime('%Y-%m-25')" name="date_to"/>
<field name="type">add</field> <field name="type">add</field>
<field name="state">draft</field> <field name="state">draft</field>
<field name="number_of_days_temp">7</field> <field name="number_of_days_temp">7</field>
@ -45,8 +45,8 @@
<record model="hr.holidays" id="hr_holidays_employee1_int_tour"> <record model="hr.holidays" id="hr_holidays_employee1_int_tour">
<field name="name">International Tour</field> <field name="name">International Tour</field>
<field name="holiday_status_id" ref="holiday_status_comp"/> <field name="holiday_status_id" ref="holiday_status_comp"/>
<field eval="time.strftime('%Y-%m-20')" name="date_from"/> <field eval="time.strftime('%Y-%m-26')" name="date_from"/>
<field eval="time.strftime('%Y-%m-22')" name="date_to"/> <field eval="time.strftime('%Y-%m-28')" name="date_to"/>
<field name="type">add</field> <field name="type">add</field>
<field name="number_of_days_temp">7</field> <field name="number_of_days_temp">7</field>
<field name="employee_id" ref="hr.employee_fp"/> <field name="employee_id" ref="hr.employee_fp"/>

View File

@ -31,6 +31,7 @@ import time
from report import report_sxw from report import report_sxw
from tools import ustr from tools import ustr
from tools.translate import _ from tools.translate import _
from tools import to_xml
def lengthmonth(year, month): def lengthmonth(year, month):
if month == 2 and ((year % 4 == 0) and ((year % 100 != 0) or (year % 400 == 0))): if month == 2 and ((year % 4 == 0) and ((year % 100 != 0) or (year % 400 == 0))):
@ -240,7 +241,7 @@ class report_custom(report_rml):
<date>%s</date> <date>%s</date>
<company>%s</company> <company>%s</company>
</header> </header>
''' % (str(rml_obj.formatLang(time.strftime("%Y-%m-%d"),date=True))+' ' + str(time.strftime("%H:%M")),pooler.get_pool(cr.dbname).get('res.users').browse(cr,uid,uid).company_id.name) ''' % (str(rml_obj.formatLang(time.strftime("%Y-%m-%d"),date=True))+' ' + str(time.strftime("%H:%M")),to_xml(pooler.get_pool(cr.dbname).get('res.users').browse(cr,uid,uid).company_id.name))
# Computing the xml # Computing the xml
xml='''<?xml version="1.0" encoding="UTF-8" ?> xml='''<?xml version="1.0" encoding="UTF-8" ?>

View File

@ -326,6 +326,7 @@ class hr_payslip(osv.osv):
return self.write(cr, uid, ids, {'paid': True, 'state': 'done'}, context=context) return self.write(cr, uid, ids, {'paid': True, 'state': 'done'}, context=context)
def hr_verify_sheet(self, cr, uid, ids, context=None): def hr_verify_sheet(self, cr, uid, ids, context=None):
self.compute_sheet(cr, uid, ids, context)
return self.write(cr, uid, ids, {'state': 'verify'}, context=context) return self.write(cr, uid, ids, {'state': 'verify'}, context=context)
def refund_sheet(self, cr, uid, ids, context=None): def refund_sheet(self, cr, uid, ids, context=None):
@ -358,6 +359,12 @@ class hr_payslip(osv.osv):
def check_done(self, cr, uid, ids, context=None): def check_done(self, cr, uid, ids, context=None):
return True return True
def unlink(self, cr, uid, ids, context=None):
for payslip in self.browse(cr, uid, ids, context=context):
if payslip.state not in ['draft','cancel']:
raise osv.except_osv(_('Warning!'),_('You cannot delete a payslip which is not draft or cancelled!'))
return super(hr_payslip, self).unlink(cr, uid, ids, context)
#TODO move this function into hr_contract module, on hr.employee object #TODO move this function into hr_contract module, on hr.employee object
def get_contract(self, cr, uid, employee, date_from, date_to, context=None): def get_contract(self, cr, uid, employee, date_from, date_to, context=None):
""" """

View File

@ -75,7 +75,7 @@
<record id="hr_salary_rule_meal_voucher" model="hr.salary.rule"> <record id="hr_salary_rule_meal_voucher" model="hr.salary.rule">
<field name="amount_select">fix</field> <field name="amount_select">fix</field>
<field eval="10" name="amount_fix"/> <field eval="10" name="amount_fix"/>
<field name="quantity">worked_days.WORK100.number_of_days</field> <field name="quantity">worked_days.WORK100 and worked_days.WORK100.number_of_days</field>
<field name="code">MA</field> <field name="code">MA</field>
<field name="category_id" ref="hr_payroll.ALW"/> <field name="category_id" ref="hr_payroll.ALW"/>
<field name="register_id" ref="hr_meal_voucher_register"/> <field name="register_id" ref="hr_meal_voucher_register"/>
@ -89,7 +89,7 @@
<field name="category_id" ref="hr_payroll.ALW"/> <field name="category_id" ref="hr_payroll.ALW"/>
<field name="name">Get 1% of sales</field> <field name="name">Get 1% of sales</field>
<field name="sequence" eval="17"/> <field name="sequence" eval="17"/>
<field name="amount_python_compute">result = (inputs.SALEURO.amount + inputs.SALASIA.amount) * 0.01</field> <field name="amount_python_compute">result = ((inputs.SALEURO and inputs.SALEURO.amount) + (inputs.SALASIA and inputs.SALASIA.amount)) * 0.01</field>
</record> </record>
<!-- Rule Inputs --> <!-- Rule Inputs -->

View File

@ -106,7 +106,7 @@
<field name="arch" type="xml"> <field name="arch" type="xml">
<form string="Jobs - Recruitment Form" version="7.0"> <form string="Jobs - Recruitment Form" version="7.0">
<header> <header>
<button name="case_close_with_emp" string="Hire" type="object" <button name="case_close_with_emp" string="Hire &amp; Create Employee" type="object"
states="draft,open,pending,done" class="oe_highlight"/> states="draft,open,pending,done" class="oe_highlight"/>
<button name="case_cancel" string="Refuse" type="object" <button name="case_cancel" string="Refuse" type="object"
states="draft,open,pending" class="oe_highlight"/> states="draft,open,pending" class="oe_highlight"/>
@ -333,7 +333,7 @@
<field name="model">hr.job</field> <field name="model">hr.job</field>
<field name="inherit_id" ref="hr.view_hr_job_form"/> <field name="inherit_id" ref="hr.view_hr_job_form"/>
<field name="arch" type="xml"> <field name="arch" type="xml">
<field name="no_of_recruitment" version="7.0" position="after"> <field name="expected_employees" version="7.0" position="after">
<label for="survey_id" groups="base.group_user"/> <label for="survey_id" groups="base.group_user"/>
<div groups="base.group_user"> <div groups="base.group_user">
<field name="survey_id" class="oe_inline" domain="[('type','=','Human Resources')]"/> <field name="survey_id" class="oe_inline" domain="[('type','=','Human Resources')]"/>

View File

@ -16,7 +16,7 @@ openerp.hr_recruitment = function(openerp) {
// Find their matching names // Find their matching names
var dataset = new openerp.web.DataSetSearch(self, 'hr.applicant_category', self.session.context, [['id', 'in', _.uniq(categ_ids)]]); var dataset = new openerp.web.DataSetSearch(self, 'hr.applicant_category', self.session.context, [['id', 'in', _.uniq(categ_ids)]]);
dataset.read_slice(['id', 'name']).then(function(result) { dataset.read_slice(['id', 'name']).done(function(result) {
_.each(result, function(v, k) { _.each(result, function(v, k) {
// Set the proper value in the DOM and display the element // Set the proper value in the DOM and display the element
self.$el.find('span[data-categ_id=' + v.id + ']').text(v.name); self.$el.find('span[data-categ_id=' + v.id + ']').text(v.name);

View File

@ -28,6 +28,7 @@ import time
import pooler import pooler
from report import report_sxw from report import report_sxw
from tools import ustr from tools import ustr
from tools import to_xml
def lengthmonth(year, month): def lengthmonth(year, month):
if month == 2 and ((year % 4 == 0) and ((year % 100 != 0) or (year % 400 == 0))): if month == 2 and ((year % 4 == 0) and ((year % 100 != 0) or (year % 400 == 0))):
@ -94,7 +95,7 @@ class report_custom(report_rml):
<date>%s</date> <date>%s</date>
<company>%s</company> <company>%s</company>
</header> </header>
''' % (str(rml_obj.formatLang(time.strftime("%Y-%m-%d"),date=True))+' ' + str(time.strftime("%H:%M")),pooler.get_pool(cr.dbname).get('res.users').browse(cr,uid,user_id).company_id.name) ''' % (str(rml_obj.formatLang(time.strftime("%Y-%m-%d"),date=True))+' ' + str(time.strftime("%H:%M")),to_xml(pooler.get_pool(cr.dbname).get('res.users').browse(cr,uid,user_id).company_id.name))
account_xml = [] account_xml = []
for account, telems in accounts.iteritems(): for account, telems in accounts.iteritems():

View File

@ -27,8 +27,9 @@ class analytical_timesheet_employee(osv.osv_memory):
_name = 'hr.analytical.timesheet.employee' _name = 'hr.analytical.timesheet.employee'
_description = 'Print Employee Timesheet & Print My Timesheet' _description = 'Print Employee Timesheet & Print My Timesheet'
_columns = { _columns = {
'month': fields.selection([(x, datetime.date(2000, x, 1).strftime('%B')) for x in range(1, 13)], 'month': fields.selection([(1,'January'), (2,'February'), (3,'March'), (4,'April'),
'Month', required=True), (5,'May'), (6,'June'), (7,'July'), (8,'August'), (9,'September'),
(10,'October'), (11,'November'), (12,'December')], 'Month', required=True),
'year': fields.integer('Year', required=True), 'year': fields.integer('Year', required=True),
'employee_id': fields.many2one('hr.employee', 'Employee', required=True) 'employee_id': fields.many2one('hr.employee', 'Employee', required=True)

View File

@ -27,8 +27,9 @@ class analytical_timesheet_employees(osv.osv_memory):
_name = 'hr.analytical.timesheet.users' _name = 'hr.analytical.timesheet.users'
_description = 'Print Employees Timesheet' _description = 'Print Employees Timesheet'
_columns = { _columns = {
'month': fields.selection([(x, datetime.date(2000, x, 1).strftime('%B')) for x in range(1, 13)], 'month': fields.selection([(1,'January'), (2,'February'), (3,'March'), (4,'April'),
'Month', required=True), (5,'May'), (6,'June'), (7,'July'), (8,'August'), (9,'September'),
(10,'October'), (11,'November'), (12,'December')], 'Month', required=True),
'year': fields.integer('Year', required=True), 'year': fields.integer('Year', required=True),
'employee_ids': fields.many2many('hr.employee', 'timesheet_employee_rel', 'timesheet_id', 'employee_id', 'employees', required=True) 'employee_ids': fields.many2many('hr.employee', 'timesheet_employee_rel', 'timesheet_id', 'employee_id', 'employees', required=True)
} }

View File

@ -7,7 +7,7 @@
<field name="factor">50.0</field> <field name="factor">50.0</field>
</record> </record>
<record id="timesheet_invoice_factor3" model="hr_timesheet_invoice.factor"> <record id="timesheet_invoice_factor3" model="hr_timesheet_invoice.factor">
<field name="name">Gratis</field> <field name="name">Free of charge</field>
<field name="customer_name">Offered developments</field> <field name="customer_name">Offered developments</field>
<field name="factor">100.0</field> <field name="factor">100.0</field>
</record> </record>

View File

@ -46,7 +46,7 @@ openerp.hr_timesheet_sheet = function(instance) {
var commands = this.field_manager.get_field_value("timesheet_ids"); var commands = this.field_manager.get_field_value("timesheet_ids");
this.res_o2m_drop.add(new instance.web.Model(this.view.model).call("resolve_2many_commands", ["timesheet_ids", commands, [], this.res_o2m_drop.add(new instance.web.Model(this.view.model).call("resolve_2many_commands", ["timesheet_ids", commands, [],
new instance.web.CompoundContext()])) new instance.web.CompoundContext()]))
.then(function(result) { .done(function(result) {
self.querying = true; self.querying = true;
self.set({sheets: result}); self.set({sheets: result});
self.querying = false; self.querying = false;
@ -57,7 +57,7 @@ openerp.hr_timesheet_sheet = function(instance) {
if (self.querying) if (self.querying)
return; return;
self.updating = true; self.updating = true;
self.field_manager.set_values({timesheet_ids: self.get("sheets")}).then(function() { self.field_manager.set_values({timesheet_ids: self.get("sheets")}).done(function() {
self.updating = false; self.updating = false;
}); });
}, },
@ -85,7 +85,7 @@ openerp.hr_timesheet_sheet = function(instance) {
var default_get; var default_get;
return this.render_drop.add(new instance.web.Model("hr.analytic.timesheet").call("default_get", [ return this.render_drop.add(new instance.web.Model("hr.analytic.timesheet").call("default_get", [
['account_id','general_account_id', 'journal_id','date','name','user_id','product_id','product_uom_id','to_invoice','amount','unit_amount'], ['account_id','general_account_id', 'journal_id','date','name','user_id','product_id','product_uom_id','to_invoice','amount','unit_amount'],
new instance.web.CompoundContext({'user_id': self.get('user_id')})]).pipe(function(result) { new instance.web.CompoundContext({'user_id': self.get('user_id')})]).then(function(result) {
default_get = result; default_get = result;
// calculating dates // calculating dates
dates = []; dates = [];
@ -108,9 +108,9 @@ openerp.hr_timesheet_sheet = function(instance) {
var account_ids = _.map(_.keys(accounts), function(el) { return el === "false" ? false : Number(el) }); var account_ids = _.map(_.keys(accounts), function(el) { return el === "false" ? false : Number(el) });
return new instance.web.Model("hr.analytic.timesheet").call("multi_on_change_account_id", [[], account_ids, return new instance.web.Model("hr.analytic.timesheet").call("multi_on_change_account_id", [[], account_ids,
new instance.web.CompoundContext({'user_id': self.get('user_id')})]).pipe(function(accounts_defaults) { new instance.web.CompoundContext({'user_id': self.get('user_id')})]).then(function(accounts_defaults) {
accounts = _(accounts).chain().map(function(lines, account_id) { accounts = _(accounts).chain().map(function(lines, account_id) {
account_defaults = _.extend({}, default_get, accounts_defaults[account_id]); account_defaults = _.extend({}, default_get, (accounts_defaults[account_id] || {}).value || {});
// group by days // group by days
account_id = account_id === "false" ? false : Number(account_id); account_id = account_id === "false" ? false : Number(account_id);
var index = _.groupBy(lines, "date"); var index = _.groupBy(lines, "date");
@ -136,7 +136,7 @@ openerp.hr_timesheet_sheet = function(instance) {
// we need the name_get of the analytic accounts // we need the name_get of the analytic accounts
return new instance.web.Model("account.analytic.account").call("name_get", [_.pluck(accounts, "account"), return new instance.web.Model("account.analytic.account").call("name_get", [_.pluck(accounts, "account"),
new instance.web.CompoundContext()]).pipe(function(result) { new instance.web.CompoundContext()]).then(function(result) {
account_names = {}; account_names = {};
_.each(result, function(el) { _.each(result, function(el) {
account_names[el[0]] = el[1]; account_names[el[0]] = el[1];
@ -146,7 +146,7 @@ openerp.hr_timesheet_sheet = function(instance) {
}); });
});; });;
}); });
})).pipe(function(result) { })).then(function(result) {
// we put all the gathered data in self, then we render // we put all the gathered data in self, then we render
self.dates = dates; self.dates = dates;
self.accounts = accounts; self.accounts = accounts;
@ -222,7 +222,7 @@ openerp.hr_timesheet_sheet = function(instance) {
return; return;
} }
var ops = self.generate_o2m_value(); var ops = self.generate_o2m_value();
new instance.web.Model("hr.analytic.timesheet").call("on_change_account_id", [[], id]).pipe(function(res) { new instance.web.Model("hr.analytic.timesheet").call("on_change_account_id", [[], id]).then(function(res) {
var def = _.extend({}, self.default_get, res.value, { var def = _.extend({}, self.default_get, res.value, {
name: self.description_line, name: self.description_line,
unit_amount: 0, unit_amount: 0,

View File

@ -65,6 +65,8 @@ class partner_vat(osv.osv_memory):
partners = [] partners = []
partner_ids = obj_partner.search(cr, uid, [('vat_subjected', '!=', False), ('vat','ilike','BE%')], context=context) partner_ids = obj_partner.search(cr, uid, [('vat_subjected', '!=', False), ('vat','ilike','BE%')], context=context)
if not partner_ids:
raise osv.except_osv(_('Error'),_('No belgian contact with a VAT number in your database.'))
cr.execute("""SELECT sub1.partner_id, sub1.name, sub1.vat, sub1.turnover, sub2.vat_amount cr.execute("""SELECT sub1.partner_id, sub1.name, sub1.vat, sub1.turnover, sub2.vat_amount
FROM (SELECT l.partner_id, p.name, p.vat, SUM(CASE WHEN c.code ='49' THEN -l.tax_amount ELSE l.tax_amount END) as turnover FROM (SELECT l.partner_id, p.name, p.vat, SUM(CASE WHEN c.code ='49' THEN -l.tax_amount ELSE l.tax_amount END) as turnover
FROM account_move_line l FROM account_move_line l
@ -190,7 +192,7 @@ class partner_vat_list(osv.osv_memory):
addr = obj_partner.address_get(cr, uid, [obj_cmpny.partner_id.id], ['invoice']) addr = obj_partner.address_get(cr, uid, [obj_cmpny.partner_id.id], ['invoice'])
if addr.get('invoice',False): if addr.get('invoice',False):
ads = obj_partner.browse(cr, uid, [addr['invoice']], context=context)[0] ads = obj_partner.browse(cr, uid, [addr['invoice']], context=context)[0]
phone = ads.phone.replace(' ','') or '' phone = ads.phone and ads.phone.replace(' ','') or ''
email = ads.email or '' email = ads.email or ''
name = ads.name or '' name = ads.name or ''
city = ads.city or '' city = ads.city or ''
@ -259,6 +261,8 @@ class partner_vat_list(osv.osv_memory):
# Turnover and Farmer tags are not included # Turnover and Farmer tags are not included
client_datas = self._get_datas(cr, uid, ids, context=context) client_datas = self._get_datas(cr, uid, ids, context=context)
if not client_datas:
raise osv.except_osv(_('Data Insufficient!'),_('No data available for the client.'))
data_client_info = '' data_client_info = ''
for amount_data in client_datas: for amount_data in client_datas:
data_client_info += """ data_client_info += """
@ -309,6 +313,8 @@ class partner_vat_list(osv.osv_memory):
datas['year'] = context['year'] datas['year'] = context['year']
datas['limit_amount'] = context['limit_amount'] datas['limit_amount'] = context['limit_amount']
datas['client_datas'] = self._get_datas(cr, uid, ids, context=context) datas['client_datas'] = self._get_datas(cr, uid, ids, context=context)
if not datas['client_datas']:
raise osv.except_osv(_('Error!'),_('No record to print.'))
return { return {
'type': 'ir.actions.report.xml', 'type': 'ir.actions.report.xml',
'report_name': 'partner.vat.listing.print', 'report_name': 'partner.vat.listing.print',

View File

@ -52,21 +52,6 @@ class ResPartnerBank(osv.osv):
'my_bank': fields.boolean('Use my account to print BVR ?', help="Check to print BVR invoices"), 'my_bank': fields.boolean('Use my account to print BVR ?', help="Check to print BVR invoices"),
} }
def name_get(self, cursor, uid, ids, context=None):
if not len(ids):
return []
bank_type_obj = self.pool.get('res.partner.bank.type')
type_ids = bank_type_obj.search(cursor, uid, [])
bank_type_names = {}
for bank_type in bank_type_obj.browse(cursor, uid, type_ids,
context=context):
bank_type_names[bank_type.code] = bank_type.name
res = []
for r in self.read(cursor, uid, ids, ['name','state'], context):
res.append((r['id'], r['name']+' : '+bank_type_names.get(r['state'], '')))
return res
def _prepare_name(self, bank): def _prepare_name(self, bank):
"Hook to get bank number of bank account" "Hook to get bank number of bank account"
res = u'' res = u''

View File

@ -131,8 +131,8 @@
<field name="tax_code_id" ref="tax_acq_196"/> <field name="tax_code_id" ref="tax_acq_196"/>
<field name="tax_sign" eval="-1"/> <field name="tax_sign" eval="-1"/>
<field name="account_collected_id" ref="pcg_44566"/> <field name="account_collected_id" ref="pcg_445662"/>
<field name="account_paid_id" ref="pcg_44566"/> <field name="account_paid_id" ref="pcg_445662"/>
<field name="ref_base_code_id" ref="tax_acq_196_ht"/> <field name="ref_base_code_id" ref="tax_acq_196_ht"/>
<field name="ref_base_sign" eval="1"/> <field name="ref_base_sign" eval="1"/>

View File

@ -3903,7 +3903,7 @@
<field name="name">Associés - Comptes courants</field> <field name="name">Associés - Comptes courants</field>
<field name="code">455</field> <field name="code">455</field>
<field name="type">view</field> <field name="type">view</field>
<field name="user_type" ref="account.data_account_type_view"/> <field name="user_type" ref="account.data_account_type_payable"/>
<field name="note">Pour frais avancés personnellement</field> <field name="note">Pour frais avancés personnellement</field>
<field name="parent_id" ref="pcg_45"/> <field name="parent_id" ref="pcg_45"/>
<field name="reconcile" eval="True"/> <field name="reconcile" eval="True"/>
@ -3912,8 +3912,8 @@
<record id="pcg_4551" model="account.account.template"> <record id="pcg_4551" model="account.account.template">
<field name="name">Principal</field> <field name="name">Principal</field>
<field name="code">4551</field> <field name="code">4551</field>
<field name="type">receivable</field> <field name="type">payable</field>
<field name="user_type" ref="account.data_account_type_receivable"/> <field name="user_type" ref="account.data_account_type_payable"/>
<field name="parent_id" ref="pcg_455"/> <field name="parent_id" ref="pcg_455"/>
<field name="reconcile" eval="True"/> <field name="reconcile" eval="True"/>
</record> </record>
@ -3921,8 +3921,8 @@
<record id="pcg_4558" model="account.account.template"> <record id="pcg_4558" model="account.account.template">
<field name="name">Intérêts courus</field> <field name="name">Intérêts courus</field>
<field name="code">4558</field> <field name="code">4558</field>
<field name="type">receivable</field> <field name="type">payable</field>
<field name="user_type" ref="account.data_account_type_receivable"/> <field name="user_type" ref="account.data_account_type_payable"/>
<field name="parent_id" ref="pcg_455"/> <field name="parent_id" ref="pcg_455"/>
<field name="reconcile" eval="True"/> <field name="reconcile" eval="True"/>
</record> </record>

View File

@ -60,6 +60,3 @@ IVC21det40,template_ivacode_pagata_21det40,IVA a credito 21% detraibile 40%,temp
IVC21Idet40,template_impcode_pagata_21det40,IVA a credito 21% detraibile 40% (imponibile),template_impcode_pagata IVC21Idet40,template_impcode_pagata_21det40,IVA a credito 21% detraibile 40% (imponibile),template_impcode_pagata
IVC21det50,template_ivacode_pagata_21det50,IVA a credito 21% detraibile 50%,template_ivacode_pagata IVC21det50,template_ivacode_pagata_21det50,IVA a credito 21% detraibile 50%,template_ivacode_pagata
IVC21Idet50,template_impcode_pagata_21det50,IVA a credito 21% detraibile 50% (imponibile),template_impcode_pagata IVC21Idet50,template_impcode_pagata_21det50,IVA a credito 21% detraibile 50% (imponibile),template_impcode_pagata
Rit,template_ra,Ritenute d'acconto,vat_code_chart_root
RitD20,template_ritcode_20,Ritenute a debito 20%,template_ra
RitD20I,template_ritimpcode_20,Ritenute a debito 20% (imponibile),template_ra

1 code id name parent_id:id
60 IVC21Idet40 template_impcode_pagata_21det40 IVA a credito 21% detraibile 40% (imponibile) template_impcode_pagata
61 IVC21det50 template_ivacode_pagata_21det50 IVA a credito 21% detraibile 50% template_ivacode_pagata
62 IVC21Idet50 template_impcode_pagata_21det50 IVA a credito 21% detraibile 50% (imponibile) template_impcode_pagata
Rit template_ra Ritenute d'acconto vat_code_chart_root
RitD20 template_ritcode_20 Ritenute a debito 20% template_ra
RitD20I template_ritimpcode_20 Ritenute a debito 20% (imponibile) template_ra

View File

@ -62,4 +62,3 @@ id,description,chart_template_id:id,name,sequence,amount,parent_id:id,child_depe
21I5,21I5,l10n_it_chart_template_generic,IVA al 21% detraibile al 50%,,0.21,,True,percent,,,purchase,template_impcode_pagata_21det50,,template_impcode_pagata_21det50,,,,False,-1,-1 21I5,21I5,l10n_it_chart_template_generic,IVA al 21% detraibile al 50%,,0.21,,True,percent,,,purchase,template_impcode_pagata_21det50,,template_impcode_pagata_21det50,,,,False,-1,-1
21I5b,21I5b,l10n_it_chart_template_generic,IVA al 21% detraibile al 50% (I),1,0.5,21I5,False,percent,,,purchase,,,,,,,False,, 21I5b,21I5b,l10n_it_chart_template_generic,IVA al 21% detraibile al 50% (I),1,0.5,21I5,False,percent,,,purchase,,,,,,,False,,
21I5a,21I5a,l10n_it_chart_template_generic,IVA al 21% detraibile al 50% (D),2,0,21I5,False,balance,1601,1601,purchase,,template_ivacode_pagata_21det50,,template_ivacode_pagata_21det50,,,False,, 21I5a,21I5a,l10n_it_chart_template_generic,IVA al 21% detraibile al 50% (D),2,0,21I5,False,balance,1601,1601,purchase,,template_ivacode_pagata_21det50,,template_ivacode_pagata_21det50,,,False,,
rit-20,rit-20,l10n_it_chart_template_generic,Ritenuta d'acconto al 20% (debito),,-0.2,,False,percent,2602,2602,purchase,template_ritimpcode_20,template_ritcode_20,template_ritimpcode_20,template_ritcode_20,-1,1,False,1,-1

1 id description chart_template_id:id name sequence amount parent_id:id child_depend type account_collected_id:id account_paid_id:id type_tax_use base_code_id:id tax_code_id:id ref_base_code_id:id ref_tax_code_id:id ref_base_sign ref_tax_sign price_include base_sign tax_sign
62 21I5 21I5 l10n_it_chart_template_generic IVA al 21% detraibile al 50% 0.21 True percent purchase template_impcode_pagata_21det50 template_impcode_pagata_21det50 False -1 -1
63 21I5b 21I5b l10n_it_chart_template_generic IVA al 21% detraibile al 50% (I) 1 0.5 21I5 False percent purchase False
64 21I5a 21I5a l10n_it_chart_template_generic IVA al 21% detraibile al 50% (D) 2 0 21I5 False balance 1601 1601 purchase template_ivacode_pagata_21det50 template_ivacode_pagata_21det50 False
rit-20 rit-20 l10n_it_chart_template_generic Ritenuta d'acconto al 20% (debito) -0.2 False percent 2602 2602 purchase template_ritimpcode_20 template_ritcode_20 template_ritimpcode_20 template_ritcode_20 -1 1 False 1 -1

View File

@ -1424,7 +1424,7 @@
<field name="reconcile" eval="True"/> <field name="reconcile" eval="True"/>
<field ref="a_15" name="parent_id"/> <field ref="a_15" name="parent_id"/>
</record> </record>
<record id="vat_payable6" model="account.account.template"> <record id="vat_payable_low" model="account.account.template">
<field name="name">Btw af te dragen laag</field> <field name="name">Btw af te dragen laag</field>
<field name="code">1601</field> <field name="code">1601</field>
<field name="type">other</field> <field name="type">other</field>
@ -1432,7 +1432,7 @@
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field ref="a_15" name="parent_id"/> <field ref="a_15" name="parent_id"/>
</record> </record>
<record id="vat_payable19" model="account.account.template"> <record id="vat_payable_high" model="account.account.template">
<field name="name">Btw af te dragen hoog</field> <field name="name">Btw af te dragen hoog</field>
<field name="code">1602</field> <field name="code">1602</field>
<field name="type">other</field> <field name="type">other</field>
@ -1448,7 +1448,7 @@
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field ref="a_15" name="parent_id"/> <field ref="a_15" name="parent_id"/>
</record> </record>
<record id="vat_refund6" model="account.account.template"> <record id="vat_refund_low" model="account.account.template">
<field name="name">Btw te vorderen laag</field> <field name="name">Btw te vorderen laag</field>
<field name="code">1611</field> <field name="code">1611</field>
<field name="type">other</field> <field name="type">other</field>
@ -1456,7 +1456,7 @@
<field name="reconcile" eval="False"/> <field name="reconcile" eval="False"/>
<field ref="a_15" name="parent_id"/> <field ref="a_15" name="parent_id"/>
</record> </record>
<record id="vat_refund19" model="account.account.template"> <record id="vat_refund_high" model="account.account.template">
<field name="name">Btw te vorderen hoog</field> <field name="name">Btw te vorderen hoog</field>
<field name="code">1612</field> <field name="code">1612</field>
<field name="type">other</field> <field name="type">other</field>
@ -3909,7 +3909,7 @@
<record id="btw_code_1a" model="account.tax.code.template"> <record id="btw_code_1a" model="account.tax.code.template">
<field name="code">1a</field> <field name="code">1a</field>
<field name="parent_id" ref="btw_code_binnenland"/> <field name="parent_id" ref="btw_code_binnenland"/>
<field name="name">Leveringen/diensten belast met 19% (BTW)</field> <field name="name">Leveringen/diensten belast met 21% (BTW)</field>
</record> </record>
<record id="btw_code_1b" model="account.tax.code.template"> <record id="btw_code_1b" model="account.tax.code.template">
<field name="code">1b</field> <field name="code">1b</field>
@ -4021,7 +4021,7 @@
<record id="omz_code_1a" model="account.tax.code.template"> <record id="omz_code_1a" model="account.tax.code.template">
<field name="code">1a</field> <field name="code">1a</field>
<field name="parent_id" ref="omz_code_binnenland"/> <field name="parent_id" ref="omz_code_binnenland"/>
<field name="name">Leveringen/diensten belast met 19% (omzet)</field> <field name="name">Leveringen/diensten belast met 21% (omzet)</field>
</record> </record>
<record id="omz_code_1b" model="account.tax.code.template"> <record id="omz_code_1b" model="account.tax.code.template">
<field name="code">1b</field> <field name="code">1b</field>
@ -4149,22 +4149,22 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
<field name="description">6% BTW</field> <field name="description">6% BTW</field>
<field eval="0.06" name="amount"/> <field eval="0.06" name="amount"/>
<field name="type">percent</field> <field name="type">percent</field>
<field name="account_collected_id" ref="vat_payable6"/> <field name="account_collected_id" ref="vat_payable_low"/>
<field name="account_paid_id" ref="vat_refund6"/> <field name="account_paid_id" ref="vat_refund_low"/>
<field name="base_code_id" ref="omz_code_1b"/> <field name="base_code_id" ref="omz_code_1b"/>
<field name="tax_code_id" ref="btw_code_1b"/> <field name="tax_code_id" ref="btw_code_1b"/>
<field name="ref_base_code_id" ref="omz_code_1b"/> <field name="ref_base_code_id" ref="omz_code_1b"/>
<field name="ref_tax_code_id" ref="btw_code_1b"/> <field name="ref_tax_code_id" ref="btw_code_1b"/>
<field name="type_tax_use">sale</field> <field name="type_tax_use">sale</field>
</record> </record>
<record id="btw_19" model="account.tax.template"> <record id="btw_21" model="account.tax.template">
<field name="chart_template_id" ref="l10nnl_chart_template"/> <field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Verkopen/omzet hoog</field> <field name="name">Verkopen/omzet hoog</field>
<field name="description">19% BTW</field> <field name="description">21% BTW</field>
<field eval="0.19" name="amount"/> <field eval="0.21" name="amount"/>
<field name="type">percent</field> <field name="type">percent</field>
<field name="account_collected_id" ref="vat_payable19"/> <field name="account_collected_id" ref="vat_payable_high"/>
<field name="account_paid_id" ref="vat_refund19"/> <field name="account_paid_id" ref="vat_refund_high"/>
<field name="base_code_id" ref="omz_code_1a"/> <field name="base_code_id" ref="omz_code_1a"/>
<field name="tax_code_id" ref="btw_code_1a"/> <field name="tax_code_id" ref="btw_code_1a"/>
<field name="ref_base_code_id" ref="omz_code_1a"/> <field name="ref_base_code_id" ref="omz_code_1a"/>
@ -4176,10 +4176,10 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
<field name="chart_template_id" ref="l10nnl_chart_template"/> <field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Verkopen/omzet overig</field> <field name="name">Verkopen/omzet overig</field>
<field name="description">variabel BTW</field> <field name="description">variabel BTW</field>
<field eval="0.19" name="amount"/> <field eval="0.21" name="amount"/>
<field name="type">percent</field> <field name="type">percent</field>
<field name="account_collected_id" ref="vat_payable19"/> <field name="account_collected_id" ref="vat_payable_high"/>
<field name="account_paid_id" ref="vat_refund19"/> <field name="account_paid_id" ref="vat_refund_high"/>
<field name="base_code_id" ref="omz_code_1a"/> <field name="base_code_id" ref="omz_code_1a"/>
<field name="tax_code_id" ref="btw_code_1a"/> <field name="tax_code_id" ref="btw_code_1a"/>
<field name="ref_base_code_id" ref="omz_code_1c"/> <field name="ref_base_code_id" ref="omz_code_1c"/>
@ -4194,20 +4194,20 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
<field name="description">6% BTW</field> <field name="description">6% BTW</field>
<field eval="0.06" name="amount"/> <field eval="0.06" name="amount"/>
<field name="type">percent</field> <field name="type">percent</field>
<field name="account_collected_id" ref="vat_refund6"/> <field name="account_collected_id" ref="vat_refund_low"/>
<field name="account_paid_id" ref="vat_payable6"/> <field name="account_paid_id" ref="vat_payable_low"/>
<field name="tax_code_id" ref="btw_code_5b"/> <field name="tax_code_id" ref="btw_code_5b"/>
<field name="ref_tax_code_id" ref="btw_code_5b"/> <field name="ref_tax_code_id" ref="btw_code_5b"/>
<field name="type_tax_use">purchase</field> <field name="type_tax_use">purchase</field>
</record> </record>
<record id="btw_19_buy" model="account.tax.template"> <record id="btw_21_buy" model="account.tax.template">
<field name="chart_template_id" ref="l10nnl_chart_template"/> <field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">BTW te vorderen hoog (inkopen)</field> <field name="name">BTW te vorderen hoog (inkopen)</field>
<field name="description">19% BTW</field> <field name="description">21% BTW</field>
<field eval="0.19" name="amount"/> <field eval="0.21" name="amount"/>
<field name="type">percent</field> <field name="type">percent</field>
<field name="account_collected_id" ref="vat_refund19"/> <field name="account_collected_id" ref="vat_refund_high"/>
<field name="account_paid_id" ref="vat_payable19"/> <field name="account_paid_id" ref="vat_payable_high"/>
<field name="tax_code_id" ref="btw_code_5b"/> <field name="tax_code_id" ref="btw_code_5b"/>
<field name="ref_tax_code_id" ref="btw_code_5b"/> <field name="ref_tax_code_id" ref="btw_code_5b"/>
<field name="type_tax_use">purchase</field> <field name="type_tax_use">purchase</field>
@ -4216,10 +4216,10 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
<field name="chart_template_id" ref="l10nnl_chart_template"/> <field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">BTW te vorderen overig (inkopen)</field> <field name="name">BTW te vorderen overig (inkopen)</field>
<field name="description">variabel BTW</field> <field name="description">variabel BTW</field>
<field eval="0.19" name="amount"/> <field eval="0.21" name="amount"/>
<field name="type">percent</field> <field name="type">percent</field>
<field name="account_collected_id" ref="vat_refund19"/> <field name="account_collected_id" ref="vat_refund_high"/>
<field name="account_paid_id" ref="vat_payable19"/> <field name="account_paid_id" ref="vat_payable_high"/>
<field name="tax_code_id" ref="btw_code_5b"/> <field name="tax_code_id" ref="btw_code_5b"/>
<field name="ref_tax_code_id" ref="btw_code_5b"/> <field name="ref_tax_code_id" ref="btw_code_5b"/>
<field name="type_tax_use">purchase</field> <field name="type_tax_use">purchase</field>
@ -4240,8 +4240,8 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
<record id="btw_ink_0" model="account.tax.template"> <record id="btw_ink_0" model="account.tax.template">
<field name="chart_template_id" ref="l10nnl_chart_template"/> <field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">BTW af te dragen verlegd (inkopen)</field> <field name="name">BTW af te dragen verlegd (inkopen)</field>
<field name="description">19% BTW verlegd</field> <field name="description">21% BTW verlegd</field>
<field eval="0.19" name="amount"/> <field eval="0.21" name="amount"/>
<field name="type">percent</field> <field name="type">percent</field>
<field name="account_collected_id" ref="vat_payable_verlegd"/> <field name="account_collected_id" ref="vat_payable_verlegd"/>
<field name="account_paid_id" ref="vat_refund_verlegd"/> <field name="account_paid_id" ref="vat_refund_verlegd"/>
@ -4277,8 +4277,8 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
<record id="btw_ink2_0" model="account.tax.template"> <record id="btw_ink2_0" model="account.tax.template">
<field name="chart_template_id" ref="l10nnl_chart_template"/> <field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">BTW te vorderen verlegd (inkopen)</field> <field name="name">BTW te vorderen verlegd (inkopen)</field>
<field name="description">19% BTW verlegd</field> <field name="description">21% BTW verlegd</field>
<field eval="0.19" name="amount"/> <field eval="0.21" name="amount"/>
<field name="type">percent</field> <field name="type">percent</field>
<field name="account_collected_id" ref="vat_refund_verlegd"/> <field name="account_collected_id" ref="vat_refund_verlegd"/>
<field name="account_paid_id" ref="vat_payable_verlegd"/> <field name="account_paid_id" ref="vat_payable_verlegd"/>
@ -4330,8 +4330,8 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
<field eval="-1.00" name="amount"/> <field eval="-1.00" name="amount"/>
<field name="type">percent</field> <field name="type">percent</field>
<field name="parent_id" ref="btw_I_6"/> <field name="parent_id" ref="btw_I_6"/>
<field name="account_collected_id" ref="vat_payable6"/> <field name="account_collected_id" ref="vat_payable_low"/>
<field name="account_paid_id" ref="vat_payable6"/> <field name="account_paid_id" ref="vat_payable_low"/>
<field eval="btw_code_4b" name="tax_code_id"/> <field eval="btw_code_4b" name="tax_code_id"/>
<field eval="btw_code_4b" name="ref_tax_code_id"/> <field eval="btw_code_4b" name="ref_tax_code_id"/>
<field name="type_tax_use">purchase</field> <field name="type_tax_use">purchase</field>
@ -4342,43 +4342,43 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
<field eval="1.00" name="amount"/> <field eval="1.00" name="amount"/>
<field name="type">percent</field> <field name="type">percent</field>
<field name="parent_id" ref="btw_I_6"/> <field name="parent_id" ref="btw_I_6"/>
<field name="account_collected_id" ref="vat_refund6"/> <field name="account_collected_id" ref="vat_refund_low"/>
<field name="account_paid_id" ref="vat_refund6"/> <field name="account_paid_id" ref="vat_refund_low"/>
<field eval="btw_code_5b" name="tax_code_id"/> <field eval="btw_code_5b" name="tax_code_id"/>
<field eval="btw_code_5b" name="ref_tax_code_id"/> <field eval="btw_code_5b" name="ref_tax_code_id"/>
<field name="type_tax_use">purchase</field> <field name="type_tax_use">purchase</field>
</record> </record>
<record id="btw_I_19" model="account.tax.template"> <record id="btw_I_21" model="account.tax.template">
<field name="chart_template_id" ref="l10nnl_chart_template"/> <field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Inkopen import binnen EU hoog</field> <field name="name">Inkopen import binnen EU hoog</field>
<field name="description">19% BTW import binnen EU</field> <field name="description">21% BTW import binnen EU</field>
<field eval="0.19" name="amount"/> <field eval="0.21" name="amount"/>
<field name="type">percent</field> <field name="type">percent</field>
<field eval="True" name="child_depend"/> <field eval="True" name="child_depend"/>
<field eval="omz_code_4b" name="base_code_id"/> <field eval="omz_code_4b" name="base_code_id"/>
<field eval="omz_code_4b" name="ref_base_code_id"/> <field eval="omz_code_4b" name="ref_base_code_id"/>
<field name="type_tax_use">purchase</field> <field name="type_tax_use">purchase</field>
</record> </record>
<record id="btw_I_19_1" model="account.tax.template"> <record id="btw_I_21_1" model="account.tax.template">
<field name="chart_template_id" ref="l10nnl_chart_template"/> <field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Inkopen import binnen EU hoog(1)</field> <field name="name">Inkopen import binnen EU hoog(1)</field>
<field eval="-1.00" name="amount"/> <field eval="-1.00" name="amount"/>
<field name="type">percent</field> <field name="type">percent</field>
<field name="parent_id" ref="btw_I_19"/> <field name="parent_id" ref="btw_I_21"/>
<field name="account_collected_id" ref="vat_payable19"/> <field name="account_collected_id" ref="vat_payable_high"/>
<field name="account_paid_id" ref="vat_payable19"/> <field name="account_paid_id" ref="vat_payable_high"/>
<field eval="btw_code_4b" name="tax_code_id"/> <field eval="btw_code_4b" name="tax_code_id"/>
<field eval="btw_code_4b" name="ref_tax_code_id"/> <field eval="btw_code_4b" name="ref_tax_code_id"/>
<field name="type_tax_use">purchase</field> <field name="type_tax_use">purchase</field>
</record> </record>
<record id="btw_I_19_2" model="account.tax.template"> <record id="btw_I_21_2" model="account.tax.template">
<field name="chart_template_id" ref="l10nnl_chart_template"/> <field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Inkopen import binnen EU hoog(2)</field> <field name="name">Inkopen import binnen EU hoog(2)</field>
<field eval="1.00" name="amount"/> <field eval="1.00" name="amount"/>
<field name="type">percent</field> <field name="type">percent</field>
<field name="parent_id" ref="btw_I_19"/> <field name="parent_id" ref="btw_I_21"/>
<field name="account_collected_id" ref="vat_refund19"/> <field name="account_collected_id" ref="vat_refund_high"/>
<field name="account_paid_id" ref="vat_refund19"/> <field name="account_paid_id" ref="vat_refund_high"/>
<field eval="btw_code_5b" name="tax_code_id"/> <field eval="btw_code_5b" name="tax_code_id"/>
<field eval="btw_code_5b" name="ref_tax_code_id"/> <field eval="btw_code_5b" name="ref_tax_code_id"/>
<field name="type_tax_use">purchase</field> <field name="type_tax_use">purchase</field>
@ -4400,8 +4400,8 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
<field eval="-1.00" name="amount"/> <field eval="-1.00" name="amount"/>
<field name="type">percent</field> <field name="type">percent</field>
<field name="parent_id" ref="btw_I_overig"/> <field name="parent_id" ref="btw_I_overig"/>
<field name="account_collected_id" ref="vat_payable19"/> <field name="account_collected_id" ref="vat_payable_high"/>
<field name="account_paid_id" ref="vat_payable19"/> <field name="account_paid_id" ref="vat_payable_high"/>
<field eval="btw_code_4b" name="tax_code_id"/> <field eval="btw_code_4b" name="tax_code_id"/>
<field eval="btw_code_4b" name="ref_tax_code_id"/> <field eval="btw_code_4b" name="ref_tax_code_id"/>
<field name="type_tax_use">purchase</field> <field name="type_tax_use">purchase</field>
@ -4412,8 +4412,8 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
<field eval="1.00" name="amount"/> <field eval="1.00" name="amount"/>
<field name="type">percent</field> <field name="type">percent</field>
<field name="parent_id" ref="btw_I_overig"/> <field name="parent_id" ref="btw_I_overig"/>
<field name="account_collected_id" ref="vat_refund19"/> <field name="account_collected_id" ref="vat_refund_high"/>
<field name="account_paid_id" ref="vat_refund19"/> <field name="account_paid_id" ref="vat_refund_high"/>
<field eval="btw_code_5b" name="tax_code_id"/> <field eval="btw_code_5b" name="tax_code_id"/>
<field eval="btw_code_5b" name="ref_tax_code_id"/> <field eval="btw_code_5b" name="ref_tax_code_id"/>
<field name="type_tax_use">purchase</field> <field name="type_tax_use">purchase</field>
@ -4463,8 +4463,8 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
<field eval="-1.00" name="amount"/> <field eval="-1.00" name="amount"/>
<field name="type">percent</field> <field name="type">percent</field>
<field name="parent_id" ref="btw_E1"/> <field name="parent_id" ref="btw_E1"/>
<field name="account_collected_id" ref="vat_payable6"/> <field name="account_collected_id" ref="vat_payable_low"/>
<field name="account_paid_id" ref="vat_payable6"/> <field name="account_paid_id" ref="vat_payable_low"/>
<field eval="btw_code_4a" name="tax_code_id"/> <field eval="btw_code_4a" name="tax_code_id"/>
<field eval="btw_code_4a" name="ref_tax_code_id"/> <field eval="btw_code_4a" name="ref_tax_code_id"/>
<field name="type_tax_use">purchase</field> <field name="type_tax_use">purchase</field>
@ -4475,8 +4475,8 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
<field eval="1.00" name="amount"/> <field eval="1.00" name="amount"/>
<field name="type">percent</field> <field name="type">percent</field>
<field name="parent_id" ref="btw_E1"/> <field name="parent_id" ref="btw_E1"/>
<field name="account_collected_id" ref="vat_refund6"/> <field name="account_collected_id" ref="vat_refund_low"/>
<field name="account_paid_id" ref="vat_refund6"/> <field name="account_paid_id" ref="vat_refund_low"/>
<field eval="btw_code_5b" name="tax_code_id"/> <field eval="btw_code_5b" name="tax_code_id"/>
<field eval="btw_code_5b" name="ref_tax_code_id"/> <field eval="btw_code_5b" name="ref_tax_code_id"/>
<field name="type_tax_use">purchase</field> <field name="type_tax_use">purchase</field>
@ -4485,7 +4485,7 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
<field name="chart_template_id" ref="l10nnl_chart_template"/> <field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Inkopen import buiten EU hoog</field> <field name="name">Inkopen import buiten EU hoog</field>
<field name="description">BTW import buiten EU</field> <field name="description">BTW import buiten EU</field>
<field eval="0.19" name="amount"/> <field eval="0.21" name="amount"/>
<field name="type">percent</field> <field name="type">percent</field>
<field eval="True" name="child_depend"/> <field eval="True" name="child_depend"/>
<field eval="omz_code_4a" name="base_code_id"/> <field eval="omz_code_4a" name="base_code_id"/>
@ -4498,8 +4498,8 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
<field eval="-1.00" name="amount"/> <field eval="-1.00" name="amount"/>
<field name="type">percent</field> <field name="type">percent</field>
<field name="parent_id" ref="btw_E2"/> <field name="parent_id" ref="btw_E2"/>
<field name="account_collected_id" ref="vat_payable19"/> <field name="account_collected_id" ref="vat_payable_high"/>
<field name="account_paid_id" ref="vat_payable19"/> <field name="account_paid_id" ref="vat_payable_high"/>
<field eval="btw_code_4a" name="tax_code_id"/> <field eval="btw_code_4a" name="tax_code_id"/>
<field eval="btw_code_4a" name="ref_tax_code_id"/> <field eval="btw_code_4a" name="ref_tax_code_id"/>
<field name="type_tax_use">purchase</field> <field name="type_tax_use">purchase</field>
@ -4510,8 +4510,8 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
<field eval="1.00" name="amount"/> <field eval="1.00" name="amount"/>
<field name="type">percent</field> <field name="type">percent</field>
<field name="parent_id" ref="btw_E2"/> <field name="parent_id" ref="btw_E2"/>
<field name="account_collected_id" ref="vat_refund19"/> <field name="account_collected_id" ref="vat_refund_high"/>
<field name="account_paid_id" ref="vat_refund19"/> <field name="account_paid_id" ref="vat_refund_high"/>
<field eval="btw_code_5b" name="tax_code_id"/> <field eval="btw_code_5b" name="tax_code_id"/>
<field eval="btw_code_5b" name="ref_tax_code_id"/> <field eval="btw_code_5b" name="ref_tax_code_id"/>
<field name="type_tax_use">purchase</field> <field name="type_tax_use">purchase</field>
@ -4520,7 +4520,7 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
<field name="chart_template_id" ref="l10nnl_chart_template"/> <field name="chart_template_id" ref="l10nnl_chart_template"/>
<field name="name">Inkopen import buiten EU overig</field> <field name="name">Inkopen import buiten EU overig</field>
<field name="description">BTW import buiten EU</field> <field name="description">BTW import buiten EU</field>
<field eval="0.19" name="amount"/> <field eval="0.21" name="amount"/>
<field name="type">percent</field> <field name="type">percent</field>
<field eval="True" name="child_depend"/> <field eval="True" name="child_depend"/>
<field eval="omz_code_4a" name="base_code_id"/> <field eval="omz_code_4a" name="base_code_id"/>
@ -4533,8 +4533,8 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
<field eval="-1.00" name="amount"/> <field eval="-1.00" name="amount"/>
<field name="type">percent</field> <field name="type">percent</field>
<field name="parent_id" ref="btw_E_overig"/> <field name="parent_id" ref="btw_E_overig"/>
<field name="account_collected_id" ref="vat_payable19"/> <field name="account_collected_id" ref="vat_payable_high"/>
<field name="account_paid_id" ref="vat_payable19"/> <field name="account_paid_id" ref="vat_payable_high"/>
<field eval="btw_code_4a" name="tax_code_id"/> <field eval="btw_code_4a" name="tax_code_id"/>
<field eval="btw_code_4a" name="ref_tax_code_id"/> <field eval="btw_code_4a" name="ref_tax_code_id"/>
<field name="type_tax_use">purchase</field> <field name="type_tax_use">purchase</field>
@ -4545,8 +4545,8 @@ TODO rubriek 1c en 1d moeten nog, zijn variabel, dus BTW percentage moet door ge
<field eval="1.00" name="amount"/> <field eval="1.00" name="amount"/>
<field name="type">percent</field> <field name="type">percent</field>
<field name="parent_id" ref="btw_E_overig"/> <field name="parent_id" ref="btw_E_overig"/>
<field name="account_collected_id" ref="vat_refund19"/> <field name="account_collected_id" ref="vat_refund_high"/>
<field name="account_paid_id" ref="vat_refund19"/> <field name="account_paid_id" ref="vat_refund_high"/>
<field eval="btw_code_5b" name="tax_code_id"/> <field eval="btw_code_5b" name="tax_code_id"/>
<field eval="btw_code_5b" name="ref_tax_code_id"/> <field eval="btw_code_5b" name="ref_tax_code_id"/>
<field name="type_tax_use">purchase</field> <field name="type_tax_use">purchase</field>

View File

@ -22,12 +22,12 @@
import mail_message_subtype import mail_message_subtype
import mail_alias import mail_alias
import mail_followers import mail_followers
import mail_vote
import mail_favorite
import mail_message import mail_message
import mail_mail import mail_mail
import mail_thread import mail_thread
import mail_group import mail_group
import mail_vote
import mail_favorite
import res_partner import res_partner
import res_users import res_users
import report import report

View File

@ -2,6 +2,12 @@
<openerp> <openerp>
<data noupdate="1"> <data noupdate="1">
<!-- Update demo user to avoid mail bombing -->
<record id="base.partner_demo" model="res.partner">
<field name="notification_email_send">none</field>
</record>
<!-- Pushed to all employees -->
<record id="message_blogpost0" model="mail.message"> <record id="message_blogpost0" model="mail.message">
<field name="model">mail.group</field> <field name="model">mail.group</field>
<field name="res_id" ref="mail.group_all_employees"/> <field name="res_id" ref="mail.group_all_employees"/>
@ -10,7 +16,6 @@ This month you also get 250 EUR of eco-vouchers if you have been in the company
<field name="type">comment</field> <field name="type">comment</field>
<field name="subtype_id" ref="mt_comment"/> <field name="subtype_id" ref="mt_comment"/>
</record> </record>
<record id="message_blogpost0_comment0" model="mail.message"> <record id="message_blogpost0_comment0" model="mail.message">
<field name="model">mail.group</field> <field name="model">mail.group</field>
<field name="res_id" ref="group_all_employees"/> <field name="res_id" ref="group_all_employees"/>
@ -19,7 +24,6 @@ This month you also get 250 EUR of eco-vouchers if you have been in the company
<field name="type">comment</field> <field name="type">comment</field>
<field name="subtype_id" ref="mt_comment"/> <field name="subtype_id" ref="mt_comment"/>
</record> </record>
<record id="message_blogpost0_comment1" model="mail.message"> <record id="message_blogpost0_comment1" model="mail.message">
<field name="model">mail.group</field> <field name="model">mail.group</field>
<field name="res_id" ref="group_all_employees"/> <field name="res_id" ref="group_all_employees"/>
@ -28,7 +32,7 @@ This month you also get 250 EUR of eco-vouchers if you have been in the company
<field name="type">comment</field> <field name="type">comment</field>
<field name="subtype_id" ref="mt_comment"/> <field name="subtype_id" ref="mt_comment"/>
</record> </record>
<!-- This one is starred for having mailboxes with demo data -->
<record id="message_blogpost0_comment2" model="mail.message"> <record id="message_blogpost0_comment2" model="mail.message">
<field name="model">mail.group</field> <field name="model">mail.group</field>
<field name="res_id" ref="group_all_employees"/> <field name="res_id" ref="group_all_employees"/>
@ -36,8 +40,8 @@ This month you also get 250 EUR of eco-vouchers if you have been in the company
<field name="parent_id" ref="message_blogpost0"/> <field name="parent_id" ref="message_blogpost0"/>
<field name="type">comment</field> <field name="type">comment</field>
<field name="subtype_id" ref="mt_comment"/> <field name="subtype_id" ref="mt_comment"/>
<field name="favorite_user_ids" eval="[(6, 0, [ref('base.user_root'), ref('base.user_demo')])]"/>
</record> </record>
<record id="message_blogpost0_comment3" model="mail.message"> <record id="message_blogpost0_comment3" model="mail.message">
<field name="model">mail.group</field> <field name="model">mail.group</field>
<field name="res_id" ref="group_all_employees"/> <field name="res_id" ref="group_all_employees"/>
@ -47,5 +51,196 @@ This month you also get 250 EUR of eco-vouchers if you have been in the company
<field name="subtype_id" ref="mt_comment"/> <field name="subtype_id" ref="mt_comment"/>
</record> </record>
<!-- Demo user and admin conversation -->
<record id="message_discussion" model="mail.message">
<field name="body">Hello Demo User! I was wondering whether you had some issues with our secret task about putting cats everywhere in OpenERP.</field>
<field name="type">comment</field>
<field name="subtype_id" ref="mt_comment"/>
<field name="author_id" ref="base.partner_root"/>
<field name="partner_ids" eval="[(6, 0, [ref('base.partner_demo')])]"/>
</record>
<record id="message_discussion_answer1" model="mail.message">
<field name="body">No specific issues, I think everything is clear.</field>
<field name="parent_id" ref="message_discussion"/>
<field name="type">comment</field>
<field name="subtype_id" ref="mt_comment"/>
<field name="author_id" ref="base.partner_demo"/>
<field name="partner_ids" eval="[(6, 0, [ref('base.partner_root')])]"/>
</record>
<record id="message_discussion_answer2" model="mail.message">
<field name="body">Ow, just to be sure... we were talking about lolcats, right ?</field>
<field name="parent_id" ref="message_discussion"/>
<field name="type">comment</field>
<field name="subtype_id" ref="mt_comment"/>
<field name="author_id" ref="base.partner_demo"/>
<field name="partner_ids" eval="[(6, 0, [ref('base.partner_root')])]"/>
</record>
<record id="message_discussion_answer3" model="mail.message">
<field name="body">Absolutely!</field>
<field name="parent_id" ref="message_discussion"/>
<field name="type">comment</field>
<field name="subtype_id" ref="mt_comment"/>
<field name="author_id" ref="base.partner_root"/>
<field name="partner_ids" eval="[(6, 0, [ref('base.partner_demo')])]"/>
</record>
<!-- External mail + reply with attachment conversation -->
<record id="message_video2" model="mail.message">
<field name="subject">Plan to install OpenERP</field>
<field name="model">mail.message</field>
<field name="body">
&lt;![CDATA[Email0 inquiry]]&gt;
&lt;div&gt;&lt;font size="2"&gt;Hello,&lt;/font&gt;&lt;/div&gt;&lt;div&gt;&lt;font size="2"&gt;&lt;br&gt;&lt;/font&gt;&lt;/div&gt;
&lt;div&gt;&lt;font size="2"&gt;I am interested in your company's product and I plan to install OpenERP for my company and affordable price.&lt;/font&gt;&lt;/div&gt;&lt;br/&gt;
&lt;div&gt;&lt;font size="2"&gt;Can you please send me services catalogue?&lt;/font&gt;&lt;/div&gt;&lt;br/&gt;
Sophie
</field>
<field name="type">email</field>
<field name="author_id" ref="base.res_partner_2"/>
<field name="partner_ids" eval="[(6, 0, [ref('base.partner_demo'), ref('base.partner_root')])]"/>
</record>
<record id="message_video2_attachment1" model="ir.attachment">
<field name="model">ir.attachment</field>
<field name="datas">bWlncmF0aW9uIHRlc3Q=</field>
<field name="datas_fname">catalogue 2012.pdf</field>
<field name="name">catalogue 2012.pdf</field>
</record>
<record id="message_video2_message1" model="mail.message">
<field name="subject">Re: Plan to install OpenERP</field>
<field name="body">
Dear Customer,&lt;br/&gt;
Thanks for showing interest in our products.&lt;br/&gt;
We have attached the catalogue,&lt;br/&gt;
We would like to know your interests, so let us know when we can call you for more details.&lt;br/&gt;
Regards
</field>
<field name="type">comment</field>
<field name="subtype_id" ref="mt_comment"/>
<field name="parent_id" ref="message_video2"/>
<field name="author_id" ref="base.partner_demo"/>
<field name="attachment_ids" eval="[(6, 0, [ref('message_video2_attachment1')])]"/>
<field name="partner_ids" eval="[(6, 0, [ref('base.partner_demo'),ref('base.partner_root'),ref('base.res_partner_2')])]"/>
</record>
<!-- Employee & other + attachments conversation -->
<record id="message_video1_attachment1" model="ir.attachment">
<field name="model">ir.attachment</field>
<field name="datas">bWlncmF0aW9uIHRlc3Q=</field>
<field name="datas_fname">migration.doc</field>
<field name="name">migration.doc</field>
</record>
<record id="message_video1_attachment2" model="ir.attachment">
<field name="model">ir.attachment</field>
<field name="datas">
/9j/4AAQSkZJRgABAQEASABIAAD/2wBDABALDA4MChAODQ4SERATGCgaGBYWGDEjJR0oOjM9PDkz
ODdASFxOQERXRTc4UG1RV19iZ2hnPk1xeXBkeFxlZ2P/2wBDARESEhgVGC8aGi9jQjhCY2NjY2Nj
Y2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2NjY2P/wAARCABkAGQDAREA
AhEBAxEB/8QAGgAAAwEBAQEAAAAAAAAAAAAAAAQFAwIBBv/EAD0QAAEDAgMDCAcHAwUAAAAAAAEA
AgMEEQUSsiExchMzNDVBUXFzIjJhkbGzwRQVJGKBwtElg6FCUlPh8P/EABoBAQADAQEBAAAAAAAA
AAAAAAADBAUBAgb/xAAwEQACAQIDBgYBBAMBAAAAAAAAAQIDBBEyMwUSMUFx8BMhNFGx0cEUgZGh
I0LhNf/aAAwDAQACEQMRAD8A+55QFzgA4lpsbDttf6qqoN8D0e5z/sf7l3w5HMQz/kd7k8OQxOJX
SOheIgWyFpDXFtwDbYV1U5DETLcVFwySnDQLNuHOO/Zc227LBevDGJ1kxE2DpYiA6+xrgSMzT3dw
d7wm4xiZtZiwLS+andZrb+g4XdcZuzdbNb22TcGINbi4YbzU7nZTuY7a6+zs3Af5HtTwxidPbihe
MksDWAvuCxxJF/R7O7f4puDE8DcVLiXSwZc7TZrHXDRa43du33puDEoZ/wAjvcvHhyGIZ/yO9yeH
IYgx4e27d1yP1BsvLWDwZ0Uyh9VVB2W4y5Mx2XLf+h7lIm1FYHBSsldTcoMkBIaXNsHG/d2+Kb7X
mzkvJNoq0ji6khcd5YCfcplwBtddAXQBdAF0AXQBdAF0AXQCWI17qIR5YhIX3vd+WwFvYe9V69wq
LimscSalR8TF48DWm5t3mP1FcnmIkZfZYqmSflWkjlG7jbc0W+JUkEnHzB6cMpizKWOItl9Y7QvW
5FjFoajYIo2xsFmtAA8F7OHSANqANqAEBnJPFE9jJJGtc82aCdpXUmzjkk8GabVw6Iy4i3NPFGwi
WJjnAuHom2z4leazdKm5ik41Km4FNVzS4Uahwj5UZ9wOW4cQNl/YvNtN1YRk+Z6uEqTaXIm108lR
SU8kuXOTKDlFhscB9FS2kt2pBL3+ixYycqcm++JYpubd5j9RVipmKyPafnKjzBpapafAM3Uhwxkq
oo6hkD3ESP8AVGU2O/t/Qrqi2sTy5pPd5my4eidh1RPNV1LJZM7WhrmjKBluXbPbuClqRUUsCClN
ybxGMQLhRvLXFpuNrTY7wvNNYy8z3VbUHgGHlzqGEucXEt2lxuSuTzM7T84oUxLpsHFF8wKSGRkN
TUR1RVM8mKVEMkmaNoJa3KBb0rb1mW9adSrOL4I0qtOMacWuLFH9Nq/Kk1BXLz0z6FK19QM0PUTv
GTW5Q2GlAsXuaXfInz9X0/FNrVfaerDr9Emz9KXfuXKbm3eY/UVNUzECFKwuEU+V7mEzja02PqBW
bdJ8SGu2o+Q5RFz6Gnc5xLnRNJPebLsuLPccqEq3rel4h8HKWOmyGWqipb2lQlgk4SL11XwR/F6n
q8EVqHGXfuOYgPwb9p3t1BR08xJWyMlGWRn2BrJHtb6FwDsN32P+FnXVWcbqME/Jl22hF27bXeA3
iXTYOKP5gWpDIzOqaiOMP65quF2pY1prVOr+TVr6Ue+Ri/p1X5MmoLSvfTPoZ9r6jv3GaLqJ3jJr
cobDSgWL3NLvkT5+r6fim1qvtPVh1+iTZ+lLv3LlNzbvMfqKmqZiBClZzU3njQFatiC4yjdAB930
1/8Aib8AkuLJIZUJ1vW9LxD4OUsdNkMtVFOwUJYJWF2FbVlxsAyPb+r1NV4IrUMz79xyvymieQbg
lu2/5gvFLMiStkZIf61B/a+Ysq89bDv3L9r6Z98h3Eh+Ng4o/mBbEMjMypqI4w/rmq4XaljWmtU6
v5NWvpR75GL+m1fkyagtK99M+hn2vqO/cYoR/QneMmtyhsNKBYvc0u+QhP1fT8U2tV9p6sOv0SbP
0pd+5cpubd5j9RU1TMQIUrebm88aArVsQXGU8wOpfPA6ORrAIWta0gb9ltvuVW3ruvjJor2VxKvF
4rgc4g9kWJ0z3uDWBzSSdw2OV1zjCk3J4ElWUYVE5PBFCCop6jNyMjH5bXt2KCFSM8rxLji0k2uJ
EADm14IBBbFsPG5c2l5W779iPZ+s+/cdYAMBi2D1W6gu2eSPQ9XnGXUSf61B/a+YqF562HfuWrX0
z75DmJW+2wW3Zo/mBbEMjMypqI5w+33zU7rZTqWNaa1Tq/k1a+lHvkYv6bV93IyagtK99M+hn2vq
Biit9xO3XvJrKhsNKBYvc0u+QhP1fT8U2tV9p6sOv0SbP0pd+5cpubd5j9RU1TMQIUrObm88aArV
sQXGUTwGojhkkjeSHSloZs37CsmwqRWMHxZT2VSm6Mp4eWJ1j22UeDfqrd/6b9/wyLaeX+Pya4Hz
1Tws/cqmzOEv2PpLz/UnzSvZUPY02bKGhwtvsSR8VLtWtJYUuWGP9/8ADGs60o3saa4PH4ZVZ1DH
wt1BXrPJHoXLzjLqThKyR9GGkkxuja7Z28oFmXNSM7yO6+H/AEmsqkZ20t3liv6KGJdNg4o/mBbc
MjKFTURxh/XNTwnUsa01qnV/JrV9KPfIxf02r8mTUFpXvpn0M619QMUR/oTvGTWVDYaUCxe5pd8h
Cfq+n4ptar7T1Ydfok2fpS79y5T827zH6ipqmYgQpWc1N540BWrYguMpJw3ptN5v7Svn7TXQ2R6G
XV/gcx7nR4D6rVv/AE37/hmdtPL/AB+TXA+eqeFn7lU2Zll+x9Jef6k2p6W3/wB2lNraq6flmBa/
+jT6P4ZXZ1DHwt1Badllh0NK74y6/kkU/SGefHrCwo+qXUj2R6ap1fwijjZIeHNJa4NaQR2EOut2
vOVO3lKPH/qKd7Jwi5R4pfk4wRznVz3OJc4xXJPacyy9ntynJs2HJytqbfsvgyqZhDWz5gTyjXsF
u8uH8K/tCtGFHcfFozaFaNO6jF82O0PUTvGTW5LDSgXr3NLvkT5+r6fim1qvtPVh1+iTZ+lLv3Ll
PzbvMfqKmnmIBarhmeJGxxhwdIHg5gP9IH0U1GoocSOrBzWCEKTDquCoikdE0hj8xs8dxH1WZQtn
TqKbYsYO3t3Slxbx+DfEqWqrHgshDdg3vHt/lXbnCtS3F74lW8tpV1hF9+Zph0FTSPlc+EHOGgAP
HZf+VBaUvAT3nxNWvVVTDAUlw6sknDxE0AdheEvaX6ialF8sDNo0JU7qNdvyWPw/sdEdQMNZTch6
QAF847DdW7eapKKfItV/8jeHMRhw2sZK1xibYSNf647HA/RZytmqyqY+WOJ5sYu3ozhLi23/AChr
Eaeqqz6EAHogbXjvutCtJVKMqa4v7RXuqEqsWlz+znDqWqpJnSPhBuwNADx3qpa0fBbcnxL29/hh
T5pJfwjKqoKuecyNhaBmJ2vHaV7vYfqN3dfAofp5fqIVcfJPEbp4qmLDjTGAFxzbQ8drifqprZql
CMXyL1w/Fba5k/7srM7rxtyuJIHKbrlU61CdSrvuXljiQ2MZW7qObx3sMP7+y3A1zY/TFiXOda97
XcT9Vbk8XiSDKsnAQAgBACAEAIAQAgBACAEAIAQAgBACAEAIAQAgBACAEAIAQAgBACAEAIAQAgBA
CAEAIAQAgP/Z
</field>
<field name="datas_fname">activity graph 2012.jpg</field>
<field name="name">activity graph 2012</field>
</record>
<record id="message_video1" model="mail.message">
<field name="model">mail.group</field>
<field name="body">
Hi,&lt;br/&gt;
The beta OpenERP 7 is scheduled for November 12.&lt;br/&gt;
You will find attached the document for migration from version 6 to 7, and the activity graph for the current year. Good reading.&lt;br/&gt;
Sincerely
</field>
<field name="type">comment</field>
<field name="subtype_id" ref="mt_comment"/>
<field name="author_id" ref="base.partner_demo"/>
<field name="attachment_ids" eval="[(6, 0, [ref('message_video1_attachment1'), ref('message_video1_attachment2')])]"/>
<field name="notified_partner_ids" eval="[(6, 0, [ref('base.partner_demo'), ref('base.partner_root')])]"/>
</record>
<record id="message_video1_message1" model="mail.message">
<field name="model">mail.group</field>
<field name="body">
Thank you,&lt;br/&gt;
Could you prepare and send us also the document for version 7.1 which will come soon?&lt;br/&gt;
Sincerely
</field>
<field name="type">comment</field>
<field name="subtype_id" ref="mt_comment"/>
<field name="parent_id" ref="message_video1"/>
<field name="author_id" ref="base.partner_root"/>
<field name="notified_partner_ids" eval="[(6, 0, [ref('base.partner_demo'), ref('base.partner_root')])]"/>
</record>
<!-- Network admin & employee conversation -->
<record id="message_video0" model="mail.message">
<field name="model">mail.group</field>
<field name="body">I changed the infrastructure of networks, if there are still changes to be made please do not hesitate to contact me.</field>
<field name="type">comment</field>
<field name="subtype_id" ref="mt_comment"/>
<field name="author_id" ref="base.partner_root"/>
<field name="notified_partner_ids" eval="[(6, 0, [ref('base.partner_demo'), ref('base.partner_root')])]"/>
</record>
<record id="message_video0_message1" model="mail.message">
<field name="model">mail.group</field>
<field name="body">Thank you, the networks is perfect now ! Could you add a IP phone for Jhon ?</field>
<field name="parent_id" ref="message_video0"/>
<field name="type">comment</field>
<field name="subtype_id" ref="mt_comment"/>
<field name="author_id" ref="base.partner_demo"/>
<field name="notified_partner_ids" eval="[(6, 0, [ref('base.partner_demo'), ref('base.partner_root')])]"/>
</record>
<record id="message_video0_message2" model="mail.message">
<field name="model">mail.group</field>
<field name="body">It's right, his internal phone number is 0093</field>
<field name="parent_id" ref="message_video0"/>
<field name="type">comment</field>
<field name="subtype_id" ref="mt_comment"/>
<field name="author_id" ref="base.partner_root"/>
<field name="notified_partner_ids" eval="[(6, 0, [ref('base.partner_demo'), ref('base.partner_root')])]"/>
</record>
</data> </data>
</openerp> </openerp>

View File

@ -9,7 +9,7 @@
<record model="mail.group" id="group_all_employees"> <record model="mail.group" id="group_all_employees">
<field name="name">Whole Company</field> <field name="name">Whole Company</field>
<field name="group_ids" eval="[(4, ref('base.group_user'))]"/> <field name="group_ids" eval="[(4, ref('base.group_user'))]"/>
<field name="description">Discussion about best sales practices and deals.</field> <field name="description">General announces for all employees.</field>
</record> </record>
<!-- notify all employees of module installation --> <!-- notify all employees of module installation -->

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