[MERGE]merged with main addons

bzr revid: dka@tinyerp.com-20130918070456-sd7fkbk9wzh9dyue
This commit is contained in:
Darshan Kalola (OpenERP) 2013-09-18 12:34:56 +05:30
commit 8175717f8b
226 changed files with 6700 additions and 5313 deletions

View File

@ -146,6 +146,7 @@ for a particular financial year and for preparation of vouchers there is a modul
'account_unit_test.xml',
],
'test': [
'test/account_test_users.yml',
'test/account_customer_invoice.yml',
'test/account_supplier_invoice.yml',
'test/account_change_currency.yml',

View File

@ -2788,6 +2788,7 @@ class account_chart_template(osv.osv):
'parent_id': fields.many2one('account.chart.template', 'Parent Chart Template'),
'code_digits': fields.integer('# of Digits', required=True, help="No. of Digits to use for account code"),
'visible': fields.boolean('Can be Visible?', help="Set this to False if you don't want this template to be used actively in the wizard that generate Chart of Accounts from templates, this is useful when you want to generate accounts of this template only when loading its child template."),
'currency_id': fields.many2one('res.currency', 'Currency'),
'complete_tax_set': fields.boolean('Complete Set of Taxes', help='This boolean helps you to choose if you want to propose to the user to encode the sale and purchase rates or choose from list of taxes. This last choice assumes that the set of tax defined on this template is complete'),
'account_root_id': fields.many2one('account.account.template', 'Root Account', domain=[('parent_id','=',False)]),
'tax_code_root_id': fields.many2one('account.tax.code.template', 'Root Tax Code', domain=[('parent_id','=',False)]),
@ -3043,12 +3044,6 @@ class wizard_multi_charts_accounts(osv.osv_memory):
'complete_tax_set': fields.boolean('Complete Set of Taxes', help='This boolean helps you to choose if you want to propose to the user to encode the sales and purchase rates or use the usual m2o fields. This last choice assumes that the set of tax defined for the chosen template is complete'),
}
def onchange_company_id(self, cr, uid, ids, company_id, context=None):
currency_id = False
if company_id:
currency_id = self.pool.get('res.company').browse(cr, uid, company_id, context=context).currency_id.id
return {'value': {'currency_id': currency_id}}
def onchange_tax_rate(self, cr, uid, ids, rate=False, context=None):
return {'value': {'purchase_tax_rate': rate or False}}
@ -3058,7 +3053,8 @@ class wizard_multi_charts_accounts(osv.osv_memory):
res['value'] = {'complete_tax_set': False, 'sale_tax': False, 'purchase_tax': False}
if chart_template_id:
data = self.pool.get('account.chart.template').browse(cr, uid, chart_template_id, context=context)
res['value'].update({'complete_tax_set': data.complete_tax_set})
currency_id = data.currency_id and data.currency_id.id or self.pool.get('res.users').browse(cr, uid, uid, context=context).company_id.currency_id.id
res['value'].update({'complete_tax_set': data.complete_tax_set, 'currency_id': currency_id})
if data.complete_tax_set:
# default tax is given by the lowest sequence. For same sequence we will take the latest created as it will be the case for tax created while isntalling the generic chart of account
sale_tax_ids = tax_templ_obj.search(cr, uid, [("chart_template_id"
@ -3090,7 +3086,13 @@ class wizard_multi_charts_accounts(osv.osv_memory):
ids = self.pool.get('account.chart.template').search(cr, uid, [('visible', '=', True)], context=context)
if ids:
if 'chart_template_id' in fields:
res.update({'only_one_chart_template': len(ids) == 1, 'chart_template_id': ids[0]})
#in order to get set default chart which was last created set max of ids.
chart_id = max(ids)
if context.get("default_charts"):
model_data = self.pool.get('ir.model.data').search_read(cr, uid, [('model','=','account.chart.template'),('module','=',context.get("default_charts"))], ['res_id'], context=context)
if model_data:
chart_id = model_data[0]['res_id']
res.update({'only_one_chart_template': len(ids) == 1, 'chart_template_id': chart_id})
if 'sale_tax' in fields:
sale_tax_ids = tax_templ_obj.search(cr, uid, [("chart_template_id"
, "=", ids[0]), ('type_tax_use', 'in', ('sale','all'))], order="sequence")

View File

@ -10,7 +10,7 @@
</form>
<footer position="replace">
<footer>
<button name="action_next" type="object" string="Continue" class="oe_highlight"/>
<button name="action_next" context="{'default_charts':charts}" type="object" string="Continue" class="oe_highlight"/>
</footer>
</footer>
<separator string="title" position="replace">

View File

@ -2120,7 +2120,7 @@
<field name="chart_template_id" widget="selection" on_change="onchange_chart_template_id(chart_template_id)" domain="[('visible','=', True)]"/>
</group>
<group>
<field name="company_id" widget="selection" on_change="onchange_company_id(company_id)"/> <!-- we assume that this wizard will be run only by administrators and as this field may cause problem if hidden (because of the default company of the user removed from the selection because already configured), we simply choosed to remove the group "multi company" of it -->
<field name="company_id" widget="selection"/> <!-- we assume that this wizard will be run only by administrators and as this field may cause problem if hidden (because of the default company of the user removed from the selection because already configured), we simply choosed to remove the group "multi company" of it -->
<field name="currency_id" class="oe_inline"/>
<field name="sale_tax" attrs="{'invisible': [('complete_tax_set', '!=', True)]}" domain="[('chart_template_id', '=', chart_template_id),('parent_id','=',False),('type_tax_use','in',('sale','all'))]"/>
<label for="sale_tax_rate" string="Sale Tax" attrs="{'invisible': [('complete_tax_set', '=', True)]}"/>

View File

@ -1,7 +1,10 @@
-
In order to test account invoice I create a new customer invoice
-
I will create bank detail
I will create bank detail with using manager access rights because account manager can only create bank details.
-
!context
uid: 'res_users_account_manager'
-
!record {model: res.partner.bank, id: res_partner_bank_0}:
state: bank
@ -11,6 +14,11 @@
footer: True
bank: base.res_bank_1
bank_name: Reserve
-
Test with that user which have rights to make Invoicing and payment and who is accountant.
-
!context
uid: 'res_users_account_user'
-
I create a customer invoice
-

View File

@ -1,3 +1,8 @@
-
Test with that user which have rights to make Invoicing.
-
!context
uid: 'res_users_account_user'
-
In order to test Confirm Draft Invoice wizard I create an invoice and confirm it with this wizard
-

View File

@ -1,3 +1,8 @@
-
Test with that Finance manager who can only create supplier invoice.
-
!context
uid: 'res_users_account_manager'
-
In order to test account invoice I create a new supplier invoice
-

View File

@ -0,0 +1,32 @@
-
Create a user as 'Accountant'
-
!record {model: res.users, id: res_users_account_user}:
company_id: base.main_company
name: Accountant
login: acc
password: acc
email: accountuser@yourcompany.com
-
I added groups for Accountant.
-
!record {model: res.users, id: res_users_account_user}:
groups_id:
- account.group_account_user
- base.group_partner_manager
-
Create a user as 'Financial Manager'
-
!record {model: res.users, id: res_users_account_manager}:
company_id: base.main_company
name: Financial Manager
login: fm
password: fm
email: accountmanager@yourcompany.com
-
I added groups for Financial Manager.
-
!record {model: res.users, id: res_users_account_manager}:
groups_id:
- account.group_account_manager
- base.group_partner_manager

View File

@ -1,3 +1,8 @@
-
Test validate account move with user who is accountant which have its rights.'
-
!context
uid: 'res_users_account_user'
-
In order to test the account move lines in OpenERP, I create account move
-

View File

@ -61,6 +61,7 @@ This module manages:
'account_voucher_data.xml',
],
'test' : [
'test/account_voucher_users.yml',
'test/case5_suppl_usd_usd.yml',
'test/account_voucher.yml',
'test/sales_receipt.yml',

View File

@ -1,3 +1,9 @@
-
I check the voucher module with user who is accountant.
-
!context
uid: 'res_users_account_voucher_user'
-
In order to check account voucher module in OpenERP I create a customer voucher
-

View File

@ -0,0 +1,32 @@
-
Create a user as 'Accountant for account voucher'
-
!record {model: res.users, id: res_users_account_voucher_user}:
company_id: base.main_company
name: Voucher Accountant
login: vacc
password: acc
email: accountant@yourcompany.com
-
I added groups to Accountant for account voucher.
-
!record {model: res.users, id: res_users_account_voucher_user}:
groups_id:
- base.group_partner_manager
- account.group_account_user
-
Create a user as 'Financial Manager for account voucher'
-
!record {model: res.users, id: res_users_account_voucher_manager}:
company_id: base.main_company
name: Financial Manager for voucher
login: fmv
password: fmv
email: finmanager@yourcompany.com
-
I added groups to Financial Manager for account voucher.
-
!record {model: res.users, id: res_users_account_voucher_manager}:
groups_id:
- base.group_partner_manager
- account.group_account_manager

View File

@ -1,4 +1,9 @@
##YAML test on the account_voucher as depicted in this bug report: https://bugs.launchpad.net/openobject-addons/+bug/954155
-
Only manager can create and take decision about bank and currency there I checkd this test with user who is finance manager.
-
!context
uid: 'res_users_account_voucher_manager'
-
In order to check the payment with multi-currency in OpenERP,
I create an invoice in EUR and make payment in USD based on the currency rating.

View File

@ -1,3 +1,8 @@
-
I test sales payment with user who is accountant.
-
!context
uid: 'res_users_account_voucher_user'
-
Create an invoice for the partner Seagate with amount 450.0
-

View File

@ -1,3 +1,8 @@
-
Accountant can also be created receipt and validate it there for I checked it with that user who is accountant.
-
!context
uid: 'res_users_account_voucher_user'
-
Creating a Voucher Receipt for partner Seagate with amount 30000.0
-

View File

@ -1,23 +1,28 @@
# Danish translation for openobject-addons
# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2012.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-03 16:03+0000\n"
"PO-Revision-Date: 2012-01-27 08:38+0000\n"
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
"PO-Revision-Date: 2013-09-15 20:07+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Danish <da@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2012-12-04 05:53+0000\n"
"X-Generator: Launchpad (build 16335)\n"
"X-Launchpad-Export-Date: 2013-09-16 05:42+0000\n"
"X-Generator: Launchpad (build 16761)\n"
#. module: base_crypt
#: model:ir.model,name:base_crypt.model_res_users
#. module: auth_crypt
#: field:res.users,password_crypt:0
msgid "Encrypted Password"
msgstr "Krypteret kodeord"
#. module: auth_crypt
#: model:ir.model,name:auth_crypt.model_res_users
msgid "Users"
msgstr ""
msgstr "Brugere"

View File

@ -0,0 +1,23 @@
# Danish translation for openobject-addons
# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
"PO-Revision-Date: 2013-09-15 20:08+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Danish <da@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-09-16 05:42+0000\n"
"X-Generator: Launchpad (build 16761)\n"
#. module: auth_oauth_signup
#: model:ir.model,name:auth_oauth_signup.model_res_users
msgid "Users"
msgstr "Bruger"

View File

@ -76,6 +76,9 @@ class sale_config_settings(osv.osv_memory):
or a lead object and archive a selected
email into an OpenERP mail message with attachments.
This installs the module plugin_outlook."""),
'module_mass_mailing': fields.boolean(
'Manage mass mailing campaigns',
help='Get access to statistics with your mass mailing, manage campaigns.'),
}
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -123,6 +123,10 @@
<field name="module_web_linkedin"/>
<label for="module_web_linkedin"/>
</div>
<div>
<field name="module_mass_mailing" class="oe_inline"/>
<label for="module_mass_mailing"/>
</div>
</div>
</group>
</div>

View File

@ -0,0 +1,45 @@
# Danish translation for openobject-addons
# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
"PO-Revision-Date: 2013-09-15 20:14+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: Danish <da@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-09-16 05:42+0000\n"
"X-Generator: Launchpad (build 16761)\n"
#. module: contacts
#: model:ir.actions.act_window,help:contacts.action_contacts
msgid ""
"<p class=\"oe_view_nocontent_create\">\n"
" Click to add a contact in your address book.\n"
" </p><p>\n"
" OpenERP helps you easily track all activities related to\n"
" a customer; discussions, history of business opportunities,\n"
" documents, etc.\n"
" </p>\n"
" "
msgstr ""
"<p class=\"oe_view_nocontent_create\">\n"
" Klik for at tilføje kontakt i din adressebog.\n"
" </p><p>\n"
" OpenERP hjælper med at spore alle aktiviteter i forbindelse med\n"
" kunde korrespondance, historik på forretnings muligheder,\n"
" dokumenter, o.s.v.\n"
" </p>\n"
" "
#. module: contacts
#: model:ir.actions.act_window,name:contacts.action_contacts
#: model:ir.ui.menu,name:contacts.menu_contacts
msgid "Contacts"
msgstr "Adressebog"

View File

@ -57,7 +57,8 @@ Dashboard for CRM will include:
'base_calendar',
'resource',
'board',
'fetchmail'
'fetchmail',
'web_kanban_sparkline',
],
'data': [
'crm_data.xml',
@ -105,6 +106,7 @@ Dashboard for CRM will include:
'crm_action_rule_demo.xml',
],
'test': [
'test/crm_access_group_users.yml',
'test/crm_lead_message.yml',
'test/lead2opportunity2win.yml',
'test/lead2opportunity_assign_salesmen.yml',
@ -121,7 +123,6 @@ Dashboard for CRM will include:
'static/src/css/crm.css'
],
'js': [
'static/lib/sparkline/jquery.sparkline.js',
'static/src/js/crm_case_section.js',
],
'installable': True,

View File

@ -99,11 +99,11 @@
<div class="oe_items_list">
<div class="oe_salesteams_leads" t-if="record.use_leads.raw_value">
<a name="%(crm_case_form_view_salesteams_lead)d" type="action">Leads</a>
<a name="%(action_report_crm_lead)d" type="action" class="oe_sparkline_bar_link"><field name="monthly_open_leads" widget="sparkline_bar">Open Leads per Month<br/>Click to see a detailed analysis of leads.</field></a>
<a name="%(action_report_crm_lead)d" type="action" class="oe_sparkline_bar_link"><field name="monthly_open_leads" widget="sparkline_bar" options="{'height': '20px', 'barWidth': 4, 'barSpacing': 1}">Open Leads per Month<br/>Click to see a detailed analysis of leads.</field></a>
</div>
<div class="oe_salesteams_opportunities">
<a name="%(crm_case_form_view_salesteams_opportunity)d" type="action">Opportunities</a>
<a name="%(action_report_crm_opportunity)d" type="action"><field name="monthly_planned_revenue" widget="sparkline_bar">Planned Revenue per Month<br/>Click to see a detailed analysis of opportunities.</field></a>
<a name="%(action_report_crm_opportunity)d" type="action"><field name="monthly_planned_revenue" widget="sparkline_bar" height="20px" barWidth="4" barSpacing="1">Planned Revenue per Month<br/>Click to see a detailed analysis of opportunities.</field></a>
</div>
</div>
</div>

View File

@ -253,6 +253,8 @@ class crm_lead(format_address, osv.osv):
multi='day_close', type="float", store=True),
'date_last_stage_update': fields.datetime('Last Stage Update', select=True),
# Messaging and marketing
'message_bounce': fields.integer('Bounce'),
# Only used for type opportunity
'probability': fields.float('Success Rate (%)', group_operator="avg"),
'planned_revenue': fields.float('Expected Revenue', track_visibility='always'),

View File

@ -169,16 +169,17 @@
<field name="description"/>
</page>
<page string="Extra Info">
<group string="Categorization" groups="base.group_multi_company,base.group_no_one" name="categorization">
<field name="company_id"
groups="base.group_multi_company"
widget="selection" colspan="2"/>
</group>
<group string="Mailings">
<field name="opt_out"/>
</group>
<group string="Misc">
<group>
<group>
<group string="Categorization" groups="base.group_multi_company,base.group_no_one" name="categorization">
<field name="company_id"
groups="base.group_multi_company"
widget="selection"/>
</group>
<group string="Mailings">
<field name="opt_out"/>
<field name="message_bounce"/>
</group>
<group string="Misc">
<field name="probability" groups="base.group_no_one"/>
<field name="active"/>
<field name="referred"/>

View File

@ -5,6 +5,7 @@
<record id="base.group_sale_salesman" model="res.groups">
<field name="name">User: Own Leads Only</field>
<field name="category_id" ref="base.module_category_sales_management"/>
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
<field name="comment">the user will have access to his own data in the sales application.</field>
</record>

File diff suppressed because it is too large Load Diff

View File

@ -9,26 +9,4 @@ openerp.crm = function(openerp) {
},
});
openerp.crm.SparklineBarWidget = openerp.web_kanban.AbstractField.extend({
className: "oe_sparkline_bar",
start: function() {
var self = this;
var title = this.$node.html();
setTimeout(function () {
var value = _.pluck(self.field.value, 'value');
var tooltips = _.pluck(self.field.value, 'tooltip');
self.$el.sparkline(value, {
type: 'bar',
barWidth: 5,
tooltipFormat: '{{offset:offset}} {{value}}',
tooltipValueLookups: {
'offset': tooltips
},
});
self.$el.tipsy({'delayIn': 0, 'html': true, 'title': function(){return title}, 'gravity': 'n'});
}, 0);
},
});
openerp.web_kanban.fields_registry.add("sparkline_bar", "openerp.crm.SparklineBarWidget");
};

View File

@ -0,0 +1,31 @@
-
Create a user as 'Crm Salesmanager'
-
!record {model: res.users, id: crm_res_users_salesmanager}:
company_id: base.main_company
name: Crm Sales manager
login: csm
password: csm
email: crmmanager@yourcompany.com
-
I added groups for Crm Salesmanager.
-
!record {model: res.users, id: crm_res_users_salesmanager}:
groups_id:
- base.group_sale_manager
-
Create a user as 'Crm Salesman'
-
!record {model: res.users, id: crm_res_users_salesman}:
company_id: base.main_company
name: Crm Salesman
login: csu
password: csu
email: crmuser@yourcompany.com
-
I added groups for Crm Salesman.
-
!record {model: res.users, id: crm_res_users_salesman}:
groups_id:
- base.group_sale_salesman_all_leads
- base.group_partner_manager

View File

@ -1,21 +1,24 @@
-
I set a new sale team (with Marketing at parent) .
I set a new sale team (with Marketing at parent) giving access rights of salesman.
-
!context
uid: 'crm_res_users_salesmanager'
-
!python {model: crm.lead}: |
section_id = self.pool.get('crm.case.section').create(cr, uid, {'name': "Phone Marketing", 'parent_id': ref("crm.crm_case_section_2")})
self.write(cr, uid, [ref("crm_case_1")], {'section_id': section_id})
-
I check unqualified lead .
Salesman check unqualified lead .
-
!assert {model: crm.lead, id: crm.crm_case_1, string: Lead is in new stage}:
- stage_id.sequence == 1
-
I escalate the lead to parent team.
Salesman escalate the lead to parent team.
-
!python {model: crm.lead}: |
self.case_escalate(cr, uid, [ref("crm_case_1")])
-
I check the lead is correctly escalated to the parent team.
Salesman check the lead is correctly escalated to the parent team.
-
!assert {model: crm.lead, id: crm.crm_case_1, string: Escalate lead to parent team}:
- section_id.name == "Marketing"

View File

@ -1,6 +1,8 @@
-
During a mixed merge (involving leads and opps), data should be handled a certain way following their type (m2o, m2m, text, ...) Start by creating two leads and an opp.
During a mixed merge (involving leads and opps), data should be handled a certain way following their type (m2o, m2m, text, ...) Start by creating two leads and an opp and giving the rights of Sales manager.
-
!context
uid: 'crm_res_users_salesmanager'
-
!record {model: crm.lead, id: test_crm_opp_1}:
type: 'opportunity'

View File

@ -1,3 +1,8 @@
-
Give the access rights of Salesman to communicate with customer.
-
!context
uid: 'crm_res_users_salesman'
-
Customer interested in our product, so he sends request by email to get more details.
-

View File

@ -1,5 +1,8 @@
-
I create a lead record to call a partner onchange, stage onchange and mailing opt-in onchange method.
Sales manager create a lead record to call a partner onchange, stage onchange and mailing opt-in onchange method.
-
!context
uid: 'crm_res_users_salesmanager'
-
!record {model: crm.lead, id: crm_case_25}:
name: 'Need more info about your pc2'
@ -7,7 +10,7 @@
type: opportunity
stage_id: crm.stage_lead1
-
I create a lead record to call a mailing opt-out onchange method.
Sales manager create a lead record to call a mailing opt-out onchange method.
-
!record {model: crm.lead, id: crm_case_18}:
name: 'Need 20 Days of Consultancy'
@ -15,7 +18,7 @@
stage_id: crm.stage_lead1
opt_out: True
-
I create a phonecall record to call a partner onchange method.
Sales manager create a phonecall record to call a partner onchange method.
-
!record {model: crm.phonecall, id: crm_phonecall_5}:
name: 'Bad time'

View File

@ -1,5 +1,8 @@
-
I Unlink the Lead.
Only Sales manager Unlink the Lead so test with Manager's access rights'.
-
!context
uid: 'crm_res_users_salesmanager'
-
!python {model: crm.lead}: |
self.unlink(cr, uid, [ref("crm_case_4")])

View File

@ -1,3 +1,8 @@
-
Giving access rights of salesman to convert the lead into opportunity.
-
!context
uid: 'crm_res_users_salesman'
-
In order to test the conversion of a lead into a opportunity,
-

View File

@ -1,5 +1,30 @@
-
During a lead to opp conversion, salesmen should be assigned to leads following the round-robin method. Start by creating 6 leads (1 to 6) and 4 salesmen (A to D).
During a lead to opp conversion, salesmen should be assigned to leads following the round-robin method. Start by creating 4 salesmen (A to D) and 6 leads (1 to 6).
-
!record {model: res.users, id: test_res_user_01}:
name: 'Test user A'
login: 'tua'
new_password: 'tua'
-
!record {model: res.users, id: test_res_user_02}:
name: 'Test user B'
login: 'tub'
new_password: 'tub'
-
!record {model: res.users, id: test_res_user_03}:
name: 'Test user C'
login: 'tuc'
new_password: 'tuc'
-
!record {model: res.users, id: test_res_user_04}:
name: 'Test user D'
login: 'tud'
new_password: 'tud'
-
Salesman also creates lead so giving access rights of salesman.
-
!context
uid: 'crm_res_users_salesman'
-
!record {model: crm.lead, id: test_crm_lead_01}:
type: 'lead'
@ -37,27 +62,7 @@
partner_name: 'Agrolait SuperSeed SA'
stage_id: stage_lead1
-
!record {model: res.users, id: test_res_user_01}:
name: 'Test user A'
login: 'tua'
new_password: 'tua'
-
!record {model: res.users, id: test_res_user_02}:
name: 'Test user B'
login: 'tub'
new_password: 'tub'
-
!record {model: res.users, id: test_res_user_03}:
name: 'Test user C'
login: 'tuc'
new_password: 'tuc'
-
!record {model: res.users, id: test_res_user_04}:
name: 'Test user D'
login: 'tud'
new_password: 'tud'
-
I create a mass convert wizard and convert all the leads.
Salesman create a mass convert wizard and convert all the leads.
-
!python {model: crm.lead2opportunity.partner.mass}: |
context.update({'active_model': 'crm.lead', 'active_ids': [ref("test_crm_lead_01"), ref("test_crm_lead_02"), ref("test_crm_lead_03"), ref("test_crm_lead_04"), ref("test_crm_lead_05"), ref("test_crm_lead_06")], 'active_id': ref("test_crm_lead_01")})

View File

@ -1,3 +1,8 @@
-
Salesman check the phone calls data so test with the access rights of salesman.
-
!context
uid: 'crm_res_users_salesman'
-
I schedule a phone call with a customer.
-

View File

@ -75,7 +75,7 @@ class email_template(osv.osv):
_description = 'Email Templates'
_order = 'name'
def render_template(self, cr, uid, template, model, res_id, context=None):
def render_template_batch(self, cr, uid, template, model, res_ids, context=None):
"""Render the given template text, replace mako expressions ``${expr}``
with the result of evaluating these expressions with
an evaluation context containing:
@ -87,46 +87,60 @@ class email_template(osv.osv):
:param str template: the template text to render
:param str model: model name of the document record this mail is related to.
:param int res_id: id of the document record this mail is related to.
:param int res_ids: list of ids of document records those mails are related to.
"""
if not template:
return u""
if context is None:
context = {}
try:
template = tools.ustr(template)
record = None
if res_id:
record = self.pool[model].browse(cr, uid, res_id, context=context)
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
variables = {
'object': record,
'user': user,
'ctx': context, # context kw would clash with mako internals
}
result = mako_template_env.from_string(template).render(variables)
if result == u"False":
result = u""
return result
except Exception:
_logger.exception("failed to render mako template value %r", template)
return u""
results = dict.fromkeys(res_ids, u"")
def get_email_template(self, cr, uid, template_id=False, record_id=None, context=None):
# try to load the template
try:
template = mako_template_env.from_string(tools.ustr(template))
except Exception:
_logger.exception("Failed to load template %r", template)
return results
# prepare template variables
user = self.pool.get('res.users').browse(cr, uid, uid, context=context)
records = self.pool[model].browse(cr, uid, res_ids, context=context) or [None]
variables = {
'user': user,
'ctx': context, # context kw would clash with mako internals
}
for record in records:
res_id = record.id if record else None
variables['object'] = record
try:
render_result = template.render(variables)
except Exception:
_logger.exception("Failed to render template %r using values %r" % (template, variables))
render_result = u""
if render_result == u"False":
render_result = u""
results[res_id] = render_result
return results
def get_email_template_batch(self, cr, uid, template_id=False, res_ids=None, context=None):
if context is None:
context = {}
if res_ids is None:
res_ids = [None]
results = dict.fromkeys(res_ids, False)
if not template_id:
return False
return results
template = self.browse(cr, uid, template_id, context)
lang = self.render_template(cr, uid, template.lang, template.model, record_id, context)
if lang:
# Use translated template if necessary
ctx = context.copy()
ctx['lang'] = lang
template = self.browse(cr, uid, template.id, ctx)
else:
template = self.browse(cr, uid, int(template_id), context)
return template
langs = self.render_template_batch(cr, uid, template.lang, template.model, res_ids, context)
for res_id, lang in langs.iteritems():
if lang:
# Use translated template if necessary
ctx = context.copy()
ctx['lang'] = lang
template = self.browse(cr, uid, template.id, ctx)
else:
template = self.browse(cr, uid, int(template_id), context)
results[res_id] = template
return results
def onchange_model_id(self, cr, uid, ids, model_id, context=None):
mod_name = False
@ -308,64 +322,75 @@ class email_template(osv.osv):
})
return {'value': result}
def generate_email(self, cr, uid, template_id, res_id, context=None):
"""Generates an email from the template for given (model, res_id) pair.
def generate_email_batch(self, cr, uid, template_id, res_ids, context=None, fields=None):
"""Generates an email from the template for given the given model based on
records given by res_ids.
:param template_id: id of the template to render.
:param res_id: id of the record to use for rendering the template (model
is taken from template definition)
:returns: a dict containing all relevant fields for creating a new
mail.mail entry, with one extra key ``attachments``, in the
format expected by :py:meth:`mail_thread.message_post`.
:param template_id: id of the template to render.
:param res_id: id of the record to use for rendering the template (model
is taken from template definition)
:returns: a dict containing all relevant fields for creating a new
mail.mail entry, with one extra key ``attachments``, in the
format expected by :py:meth:`mail_thread.message_post`.
"""
if context is None:
context = {}
if fields is None:
fields = ['subject', 'body_html', 'email_from', 'email_to', 'partner_to', 'email_cc', 'reply_to']
report_xml_pool = self.pool.get('ir.actions.report.xml')
template = self.get_email_template(cr, uid, template_id, res_id, context)
values = {}
for field in ['subject', 'body_html', 'email_from',
'email_to', 'partner_to', 'email_cc', 'reply_to']:
values[field] = self.render_template(cr, uid, getattr(template, field),
template.model, res_id, context=context) \
or False
if template.user_signature:
signature = self.pool.get('res.users').browse(cr, uid, uid, context).signature
values['body_html'] = tools.append_content_to_html(values['body_html'], signature)
res_ids_to_templates = self.get_email_template_batch(cr, uid, template_id, res_ids, context)
if values['body_html']:
values['body'] = tools.html_sanitize(values['body_html'])
# templates: res_id -> template; template -> res_ids
templates_to_res_ids = {}
for res_id, template in res_ids_to_templates.iteritems():
templates_to_res_ids.setdefault(template, []).append(res_id)
values.update(mail_server_id=template.mail_server_id.id or False,
auto_delete=template.auto_delete,
model=template.model,
res_id=res_id or False)
results = dict()
for template, template_res_ids in templates_to_res_ids.iteritems():
# generate fields value for all res_ids linked to the current template
for field in ['subject', 'body_html', 'email_from', 'email_to', 'partner_to', 'email_cc', 'reply_to']:
generated_field_values = self.render_template_batch(cr, uid, getattr(template, field), template.model, template_res_ids, context=context)
for res_id, field_value in generated_field_values.iteritems():
results.setdefault(res_id, dict())[field] = field_value
# update values for all res_ids
for res_id in template_res_ids:
values = results[res_id]
if template.user_signature:
signature = self.pool.get('res.users').browse(cr, uid, uid, context).signature
values['body_html'] = tools.append_content_to_html(values['body_html'], signature)
if values['body_html']:
values['body'] = tools.html_sanitize(values['body_html'])
values.update(
mail_server_id=template.mail_server_id.id or False,
auto_delete=template.auto_delete,
model=template.model,
res_id=res_id or False,
attachment_ids=[attach.id for attach in template.attachment_ids],
)
attachments = []
# Add report in attachments
if template.report_template:
report_name = self.render_template(cr, uid, template.report_name, template.model, res_id, context=context)
report_service = report_xml_pool.browse(cr, uid, template.report_template.id, context).report_name
# Ensure report is rendered using template's language
ctx = context.copy()
if template.lang:
ctx['lang'] = self.render_template(cr, uid, template.lang, template.model, res_id, context)
result, format = openerp.report.render_report(cr, uid, [res_id], report_service, {'model': template.model}, ctx)
result = base64.b64encode(result)
if not report_name:
report_name = 'report.' + report_service
ext = "." + format
if not report_name.endswith(ext):
report_name += ext
attachments.append((report_name, result))
# Add report in attachments
if template.report_template:
for res_id in template_res_ids:
attachments = []
report_name = self.render_template(cr, uid, template.report_name, template.model, res_id, context=context)
report_service = report_xml_pool.browse(cr, uid, template.report_template.id, context).report_name
# Ensure report is rendered using template's language
ctx = context.copy()
if template.lang:
ctx['lang'] = self.render_template_batch(cr, uid, template.lang, template.model, res_id, context) # take 0 ?
result, format = openerp.report.render_report(cr, uid, [res_id], report_service, {'model': template.model}, ctx)
result = base64.b64encode(result)
if not report_name:
report_name = 'report.' + report_service
ext = "." + format
if not report_name.endswith(ext):
report_name += ext
attachments.append((report_name, result))
attachment_ids = []
# Add template attachments
for attach in template.attachment_ids:
attachment_ids.append(attach.id)
values['attachments'] = attachments
values['attachments'] = attachments
values['attachment_ids'] = attachment_ids
return values
return results
def send_mail(self, cr, uid, template_id, res_id, force_send=False, raise_exception=False, context=None):
"""Generates a new mail message for the given template and record,
@ -412,4 +437,14 @@ class email_template(osv.osv):
mail_mail.send(cr, uid, [msg_id], raise_exception=raise_exception, context=context)
return msg_id
# Compatibility method
def render_template(self, cr, uid, template, model, res_id, context=None):
return self.render_template_batch(cr, uid, template, model, [res_id], context)[res_id]
def get_email_template(self, cr, uid, template_id=False, record_id=None, context=None):
return self.get_email_template_batch(cr, uid, template_id, [record_id], context)[record_id]
def generate_email(self, cr, uid, template_id, res_id, context=None):
return self.generate_email_batch(cr, uid, template_id, [res_id], context)[res_id]
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -0,0 +1,490 @@
# English (United Kingdom) translation for openobject-addons
# Copyright (c) 2013 Rosetta Contributors and Canonical Ltd 2013
# This file is distributed under the same license as the openobject-addons package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2013.
#
msgid ""
msgstr ""
"Project-Id-Version: openobject-addons\n"
"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
"POT-Creation-Date: 2012-12-21 17:05+0000\n"
"PO-Revision-Date: 2013-09-14 06:46+0000\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: English (United Kingdom) <en_GB@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Launchpad-Export-Date: 2013-09-15 05:49+0000\n"
"X-Generator: Launchpad (build 16761)\n"
#. module: email_template
#: field:email.template,email_from:0
#: field:email_template.preview,email_from:0
msgid "From"
msgstr "From"
#. module: email_template
#: field:mail.compose.message,template_id:0
msgid "Template"
msgstr ""
#. module: email_template
#: help:email.template,ref_ir_value:0
#: help:email_template.preview,ref_ir_value:0
msgid "Sidebar button to open the sidebar action"
msgstr "Sidebar button to open the sidebar action"
#. module: email_template
#: field:res.partner,opt_out:0
msgid "Opt-Out"
msgstr "Opt-Out"
#. module: email_template
#: field:email.template,email_to:0
#: field:email_template.preview,email_to:0
msgid "To (Emails)"
msgstr "To (E-mails)"
#. module: email_template
#: field:email.template,mail_server_id:0
#: field:email_template.preview,mail_server_id:0
msgid "Outgoing Mail Server"
msgstr "Outgoing Mail Server"
#. module: email_template
#: help:email.template,ref_ir_act_window:0
#: help:email_template.preview,ref_ir_act_window:0
msgid ""
"Sidebar action to make this template available on records of the related "
"document model"
msgstr ""
"Sidebar action to make this template available on records of the related "
"document model"
#. module: email_template
#: field:email.template,model_object_field:0
#: field:email_template.preview,model_object_field:0
msgid "Field"
msgstr "Field"
#. module: email_template
#: help:email.template,email_from:0
#: help:email_template.preview,email_from:0
msgid "Sender address (placeholders may be used here)"
msgstr ""
#. module: email_template
#: view:email.template:0
msgid "Remove context action"
msgstr "Remove context action"
#. module: email_template
#: help:email.template,mail_server_id:0
#: help:email_template.preview,mail_server_id:0
msgid ""
"Optional preferred server for outgoing mails. If not set, the highest "
"priority one will be used."
msgstr ""
#. module: email_template
#: field:email.template,report_name:0
#: field:email_template.preview,report_name:0
msgid "Report Filename"
msgstr "Report Filename"
#. module: email_template
#: view:email.template:0
msgid "Preview"
msgstr ""
#. module: email_template
#: field:email.template,reply_to:0
#: field:email_template.preview,reply_to:0
msgid "Reply-To"
msgstr ""
#. module: email_template
#: view:mail.compose.message:0
msgid "Use template"
msgstr ""
#. module: email_template
#: field:email.template,body_html:0
#: field:email_template.preview,body_html:0
msgid "Body"
msgstr ""
#. module: email_template
#: code:addons/email_template/email_template.py:247
#, python-format
msgid "%s (copy)"
msgstr ""
#. module: email_template
#: help:email.template,user_signature:0
#: help:email_template.preview,user_signature:0
msgid ""
"If checked, the user's signature will be appended to the text version of the "
"message"
msgstr ""
#. module: email_template
#: view:email.template:0
msgid "SMTP Server"
msgstr ""
#. module: email_template
#: view:mail.compose.message:0
msgid "Save as new template"
msgstr ""
#. module: email_template
#: help:email.template,sub_object:0
#: help:email_template.preview,sub_object:0
msgid ""
"When a relationship field is selected as first field, this field shows the "
"document model the relationship goes to."
msgstr ""
#. module: email_template
#: model:ir.model,name:email_template.model_email_template
msgid "Email Templates"
msgstr ""
#. module: email_template
#: help:email.template,report_name:0
#: help:email_template.preview,report_name:0
msgid ""
"Name to use for the generated report file (may contain placeholders)\n"
"The extension can be omitted and will then come from the report type."
msgstr ""
#. module: email_template
#: field:email.template,ref_ir_act_window:0
#: field:email_template.preview,ref_ir_act_window:0
msgid "Sidebar action"
msgstr ""
#. module: email_template
#: help:email.template,lang:0
#: help:email_template.preview,lang:0
msgid ""
"Optional translation language (ISO code) to select when sending out an "
"email. If not set, the english version will be used. This should usually be "
"a placeholder expression that provides the appropriate language code, e.g. "
"${object.partner_id.lang.code}."
msgstr ""
#. module: email_template
#: field:email_template.preview,res_id:0
msgid "Sample Document"
msgstr ""
#. module: email_template
#: help:email.template,model_object_field:0
#: help:email_template.preview,model_object_field:0
msgid ""
"Select target field from the related document model.\n"
"If it is a relationship field you will be able to select a target field at "
"the destination of the relationship."
msgstr ""
#. module: email_template
#: view:email.template:0
msgid "Dynamic Value Builder"
msgstr ""
#. module: email_template
#: model:ir.actions.act_window,name:email_template.wizard_email_template_preview
msgid "Template Preview"
msgstr ""
#. module: email_template
#: view:mail.compose.message:0
msgid "Save as a new template"
msgstr ""
#. module: email_template
#: view:email.template:0
msgid ""
"Display an option on related documents to open a composition wizard with "
"this template"
msgstr ""
#. module: email_template
#: help:email.template,email_cc:0
#: help:email_template.preview,email_cc:0
msgid "Carbon copy recipients (placeholders may be used here)"
msgstr ""
#. module: email_template
#: help:email.template,email_to:0
#: help:email_template.preview,email_to:0
msgid "Comma-separated recipient addresses (placeholders may be used here)"
msgstr ""
#. module: email_template
#: view:email.template:0
msgid "Advanced"
msgstr ""
#. module: email_template
#: view:email_template.preview:0
msgid "Preview of"
msgstr ""
#. module: email_template
#: view:email_template.preview:0
msgid "Using sample document"
msgstr ""
#. module: email_template
#: view:email.template:0
#: model:ir.actions.act_window,name:email_template.action_email_template_tree_all
#: model:ir.ui.menu,name:email_template.menu_email_templates
msgid "Templates"
msgstr ""
#. module: email_template
#: field:email.template,name:0
#: field:email_template.preview,name:0
msgid "Name"
msgstr ""
#. module: email_template
#: field:email.template,lang:0
#: field:email_template.preview,lang:0
msgid "Language"
msgstr ""
#. module: email_template
#: model:ir.model,name:email_template.model_email_template_preview
msgid "Email Template Preview"
msgstr ""
#. module: email_template
#: view:email_template.preview:0
msgid "Email Preview"
msgstr ""
#. module: email_template
#: view:email.template:0
msgid ""
"Remove the contextual action to use this template on related documents"
msgstr ""
#. module: email_template
#: field:email.template,copyvalue:0
#: field:email_template.preview,copyvalue:0
msgid "Placeholder Expression"
msgstr ""
#. module: email_template
#: field:email.template,sub_object:0
#: field:email_template.preview,sub_object:0
msgid "Sub-model"
msgstr ""
#. module: email_template
#: help:email.template,subject:0
#: help:email_template.preview,subject:0
msgid "Subject (placeholders may be used here)"
msgstr ""
#. module: email_template
#: help:email.template,reply_to:0
#: help:email_template.preview,reply_to:0
msgid "Preferred response address (placeholders may be used here)"
msgstr ""
#. module: email_template
#: field:email.template,ref_ir_value:0
#: field:email_template.preview,ref_ir_value:0
msgid "Sidebar Button"
msgstr ""
#. module: email_template
#: field:email.template,report_template:0
#: field:email_template.preview,report_template:0
msgid "Optional report to print and attach"
msgstr ""
#. module: email_template
#: help:email.template,null_value:0
#: help:email_template.preview,null_value:0
msgid "Optional value to use if the target field is empty"
msgstr ""
#. module: email_template
#: view:email.template:0
msgid "Model"
msgstr ""
#. module: email_template
#: model:ir.model,name:email_template.model_mail_compose_message
msgid "Email composition wizard"
msgstr ""
#. module: email_template
#: view:email.template:0
msgid "Add context action"
msgstr ""
#. module: email_template
#: help:email.template,model_id:0
#: help:email_template.preview,model_id:0
msgid "The kind of document with with this template can be used"
msgstr ""
#. module: email_template
#: field:email.template,email_recipients:0
#: field:email_template.preview,email_recipients:0
msgid "To (Partners)"
msgstr ""
#. module: email_template
#: field:email.template,auto_delete:0
#: field:email_template.preview,auto_delete:0
msgid "Auto Delete"
msgstr ""
#. module: email_template
#: help:email.template,copyvalue:0
#: help:email_template.preview,copyvalue:0
msgid ""
"Final placeholder expression, to be copy-pasted in the desired template "
"field."
msgstr ""
#. module: email_template
#: field:email.template,model:0
#: field:email_template.preview,model:0
msgid "Related Document Model"
msgstr ""
#. module: email_template
#: view:email.template:0
msgid "Addressing"
msgstr ""
#. module: email_template
#: help:email.template,email_recipients:0
#: help:email_template.preview,email_recipients:0
msgid ""
"Comma-separated ids of recipient partners (placeholders may be used here)"
msgstr ""
#. module: email_template
#: field:email.template,attachment_ids:0
#: field:email_template.preview,attachment_ids:0
msgid "Attachments"
msgstr ""
#. module: email_template
#: code:addons/email_template/email_template.py:234
#, python-format
msgid "Deletion of the action record failed."
msgstr ""
#. module: email_template
#: field:email.template,email_cc:0
#: field:email_template.preview,email_cc:0
msgid "Cc"
msgstr ""
#. module: email_template
#: field:email.template,model_id:0
#: field:email_template.preview,model_id:0
msgid "Applies to"
msgstr ""
#. module: email_template
#: field:email.template,sub_model_object_field:0
#: field:email_template.preview,sub_model_object_field:0
msgid "Sub-field"
msgstr ""
#. module: email_template
#: view:email.template:0
msgid "Email Details"
msgstr ""
#. module: email_template
#: code:addons/email_template/email_template.py:199
#, python-format
msgid "Send Mail (%s)"
msgstr ""
#. module: email_template
#: help:res.partner,opt_out:0
msgid ""
"If checked, this partner will not receive any automated email notifications, "
"such as the availability of invoices."
msgstr ""
#. module: email_template
#: help:email.template,auto_delete:0
#: help:email_template.preview,auto_delete:0
msgid "Permanently delete this email after sending it, to save space"
msgstr ""
#. module: email_template
#: view:email.template:0
msgid "Group by..."
msgstr ""
#. module: email_template
#: help:email.template,sub_model_object_field:0
#: help:email_template.preview,sub_model_object_field:0
msgid ""
"When a relationship field is selected as first field, this field lets you "
"select the target field within the destination document model (sub-model)."
msgstr ""
#. module: email_template
#: code:addons/email_template/email_template.py:234
#, python-format
msgid "Warning"
msgstr ""
#. module: email_template
#: field:email.template,user_signature:0
#: field:email_template.preview,user_signature:0
msgid "Add Signature"
msgstr ""
#. module: email_template
#: model:ir.model,name:email_template.model_res_partner
msgid "Partner"
msgstr ""
#. module: email_template
#: field:email.template,null_value:0
#: field:email_template.preview,null_value:0
msgid "Default Value"
msgstr ""
#. module: email_template
#: help:email.template,attachment_ids:0
#: help:email_template.preview,attachment_ids:0
msgid ""
"You may attach files to this template, to be added to all emails created "
"from this template"
msgstr ""
#. module: email_template
#: help:email.template,body_html:0
#: help:email_template.preview,body_html:0
msgid "Rich-text/HTML version of the message (placeholders may be used here)"
msgstr ""
#. module: email_template
#: view:email.template:0
msgid "Contents"
msgstr ""
#. module: email_template
#: field:email.template,subject:0
#: field:email_template.preview,subject:0
msgid "Subject"
msgstr ""

View File

@ -20,10 +20,10 @@
##############################################################################
import base64
from openerp.addons.mail.tests.test_mail_base import TestMailBase
from openerp.addons.mail.tests.common import TestMail
class test_message_compose(TestMailBase):
class test_message_compose(TestMail):
def setUp(self):
super(test_message_compose, self).setUp()
@ -73,7 +73,7 @@ class test_message_compose(TestMailBase):
# 1. Comment on pigs
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>', 'post': True},
{'default_composition_mode': 'comment',
'default_model': 'mail.group',
'default_res_id': self.group_pigs_id,
@ -101,7 +101,7 @@ class test_message_compose(TestMailBase):
'default_template_id': email_template_id,
'active_ids': [self.group_pigs_id, self.group_bird_id]
}
compose_id = mail_compose.create(cr, uid, {'subject': 'Forget me subject', 'body': 'Dummy body'}, context)
compose_id = mail_compose.create(cr, uid, {'subject': 'Forget me subject', 'body': 'Dummy body', 'post': True}, context)
compose = mail_compose.browse(cr, uid, compose_id, context)
onchange_res = compose.onchange_template_id(email_template_id, 'comment', 'mail.group', self.group_pigs_id)['value']
onchange_res['partner_ids'] = [(4, partner_id) for partner_id in onchange_res.pop('partner_ids', [])]
@ -145,7 +145,7 @@ class test_message_compose(TestMailBase):
'default_partner_ids': [p_a_id],
'active_ids': [self.group_pigs_id, self.group_bird_id]
}
compose_id = mail_compose.create(cr, uid, {'subject': 'Forget me subject', 'body': 'Dummy body'}, context)
compose_id = mail_compose.create(cr, uid, {'subject': 'Forget me subject', 'body': 'Dummy body', 'post': True}, context)
compose = mail_compose.browse(cr, uid, compose_id, context)
onchange_res = compose.onchange_template_id(email_template_id, 'mass_mail', 'mail.group', self.group_pigs_id)['value']
onchange_res['partner_ids'] = [(4, partner_id) for partner_id in onchange_res.pop('partner_ids', [])]

View File

@ -62,6 +62,7 @@ class mail_compose_message(osv.TransientModel):
for wizard in self.browse(cr, uid, ids, context=context):
if wizard.template_id:
wizard_context['mail_notify_user_signature'] = False # template user_signature is added when generating body_html
wizard_context['mail_auto_delete'] = wizard.template_id.auto_delete # mass mailing: use template auto_delete value -> note, for emails mass mailing only
if not wizard.attachment_ids or wizard.composition_mode == 'mass_mail' or not wizard.template_id:
continue
new_attachment_ids = []
@ -81,7 +82,7 @@ class mail_compose_message(osv.TransientModel):
template_values = self.pool.get('email.template').read(cr, uid, template_id, fields, context)
values = dict((field, template_values[field]) for field in fields if template_values.get(field))
elif template_id:
values = self.generate_email_for_composer(cr, uid, template_id, res_id, context=context)
values = self.generate_email_for_composer_batch(cr, uid, template_id, [res_id], context=context)[res_id]
# transform attachments into attachment_ids; not attached to the document because this will
# be done further in the posting process, allowing to clean database if email not send
values['attachment_ids'] = values.pop('attachment_ids', [])
@ -147,45 +148,55 @@ class mail_compose_message(osv.TransientModel):
partner_ids.append(int(partner_id))
return partner_ids
def generate_email_for_composer(self, cr, uid, template_id, res_id, context=None):
def generate_email_for_composer_batch(self, cr, uid, template_id, res_ids, context=None):
""" Call email_template.generate_email(), get fields relevant for
mail.compose.message, transform email_cc and email_to into partner_ids """
template_values = self.pool.get('email.template').generate_email(cr, uid, template_id, res_id, context=context)
# filter template values
fields = ['subject', 'body_html', 'email_from', 'email_to', 'partner_to', 'email_cc', 'reply_to', 'attachment_ids', 'attachments', 'mail_server_id']
values = dict((field, template_values[field]) for field in fields if template_values.get(field))
values['body'] = values.pop('body_html', '')
values = dict.fromkeys(res_ids, False)
# transform email_to, email_cc into partner_ids
ctx = dict((k, v) for k, v in (context or {}).items() if not k.startswith('default_'))
partner_ids = self._get_or_create_partners_from_values(cr, uid, values, context=ctx)
# legacy template behavior: void values do not erase existing values and the
# related key is removed from the values dict
if partner_ids:
values['partner_ids'] = list(partner_ids)
template_values = self.pool.get('email.template').generate_email_batch(cr, uid, template_id, res_ids, context=context)
for res_id in res_ids:
res_id_values = dict((field, template_values[res_id][field]) for field in fields if template_values[res_id].get(field))
res_id_values['body'] = res_id_values.pop('body_html', '')
# transform email_to, email_cc into partner_ids
ctx = dict((k, v) for k, v in (context or {}).items() if not k.startswith('default_'))
partner_ids = self._get_or_create_partners_from_values(cr, uid, res_id_values, context=ctx)
# legacy template behavior: void values do not erase existing values and the
# related key is removed from the values dict
if partner_ids:
res_id_values['partner_ids'] = list(partner_ids)
values[res_id] = res_id_values
return values
def render_message(self, cr, uid, wizard, res_id, context=None):
def render_message_batch(self, cr, uid, wizard, res_ids, context=None):
""" Override to handle templates. """
# generate the composer email
# generate template-based values
if wizard.template_id:
values = self.generate_email_for_composer(cr, uid, wizard.template_id.id, res_id, context=context)
template_values = self.generate_email_for_composer_batch(cr, uid, wizard.template_id.id, res_ids, context=context)
else:
values = {}
# remove attachments as they should not be rendered
values.pop('attachment_ids', None)
# get values to return
email_dict = super(mail_compose_message, self).render_message(cr, uid, wizard, res_id, context)
# those values are not managed; they are readonly
email_dict.pop('email_to', None)
email_dict.pop('email_cc', None)
email_dict.pop('partner_to', None)
# update template values by wizard values
values.update(email_dict)
return values
template_values = dict.fromkeys(res_ids, dict())
# generate composer values
composer_values = super(mail_compose_message, self).render_message_batch(cr, uid, wizard, res_ids, context)
def render_template(self, cr, uid, template, model, res_id, context=None):
return self.pool.get('email.template').render_template(cr, uid, template, model, res_id, context=context)
for res_id in res_ids:
# remove attachments from template values as they should not be rendered
template_values[res_id].pop('attachment_ids', None)
# remove some keys from composer that are readonly
composer_values[res_id].pop('email_to', None)
composer_values[res_id].pop('email_cc', None)
composer_values[res_id].pop('partner_to', None)
# update template values by composer values
template_values[res_id].update(composer_values[res_id])
return template_values
def render_template_batch(self, cr, uid, template, model, res_ids, context=None):
return self.pool.get('email.template').render_template_batch(cr, uid, template, model, res_ids, context=context)
# Compatibility methods
def generate_email_for_composer(self, cr, uid, template_id, res_id, context=None):
return self.generate_email_for_composer_batch(cr, uid, template_id, [res_id], context)[res_id]
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:

View File

@ -11,7 +11,7 @@
<label string="Template Recipients" for="partner_to"
groups="base.group_no_one"
attrs="{'invisible':[('composition_mode', '!=', 'mass_mail')]}"/>
<div groups="base.group_no_one"
<div groups="base.group_no_one" name="template_recipients"
attrs="{'invisible':[('composition_mode', '!=', 'mass_mail')]}">
<group class="oe_grey">
<!-- <label string="Partners" for="partner_to"/> -->

View File

@ -52,7 +52,7 @@ Key Features
'email_template.xml',
],
'demo': ['event_demo.xml'],
'test': ['test/process/event_draft2done.yml'],
'test': ['test/ui/event_users.yml','test/process/event_draft2done.yml'],
'css': ['static/src/css/event.css'],
'installable': True,
'application': True,

View File

@ -10,6 +10,7 @@
<record id="group_event_user" model="res.groups">
<field name="name">User</field>
<field name="implied_ids" eval="[(4, ref('base.group_user'))]"/>
<field name="category_id" ref="module_category_event_management"/>
</record>

View File

@ -1,3 +1,8 @@
-
Give the access rights of Event user to organize an event and also do registration.
-
!context
uid: 'res_users_eventuser'
-
I want to organize an event,
into this conference I should create two registration.

View File

@ -0,0 +1,30 @@
-
Create a user as 'Event manager'
-
!record {model: res.users, id: res_users_eventmanager}:
company_id: base.main_company
name: Event manager
login: em
password: em
email: eventmanager@yourcompany.com
-
I added groups for Event manager.
-
!record {model: res.users, id: res_users_eventmanager}:
groups_id:
- event.group_event_manager
-
Create a user as 'Event user'
-
!record {model: res.users, id: res_users_eventuser}:
company_id: base.main_company
name: User
login: eu
password: eu
email: eventuser@yourcompany.com
-
I added groups for Event user.
-
!record {model: res.users, id: res_users_eventuser}:
groups_id:
- event.group_event_user

View File

@ -64,6 +64,7 @@ You can manage:
],
'demo': ['hr_demo.xml'],
'test': [
'test/hr_users.yml',
'test/open2recruit2close_job.yml',
'test/hr_demo.yml',
],

View File

@ -1,3 +1,8 @@
-
Give the access rights of Hr Officer to create employee.
-
!context
uid: 'res_users_hr_officer'
-
!record {model: hr.job, id: job_developer, view: False}:
no_of_employee: 0.0

View File

@ -0,0 +1,42 @@
-
Create a user as 'HR Manager'
-
!record {model: res.users, id: res_users_hr_manager}:
company_id: base.main_company
name: HR manager
login: hrm
password: hrm
-
I added groups for HR Manager.
-
!record {model: res.users, id: res_users_hr_manager}:
groups_id:
- base.group_hr_manager
-
Create a user as 'HR Officer'
-
!record {model: res.users, id: res_users_hr_officer}:
company_id: base.main_company
name: HR Officer
login: hro
password: hro
-
I added groups for HR Officer.
-
!record {model: res.users, id: res_users_hr_officer}:
groups_id:
- base.group_hr_user
-
Create a user as 'Employee'
-
!record {model: res.users, id: res_users_employee}:
company_id: base.main_company
name: Employee
login: emp
password: emp
-
I added groups for Employee.
-
!record {model: res.users, id: res_users_employee}:
groups_id:
- base.group_user

View File

@ -1,3 +1,8 @@
-
Give the access rights of Hr Officer to the user to test the process of Human Resource Management.
-
!context
uid: 'res_users_hr_officer'
-
In order to test the process of Human Resource Management, I open Job Postion for "Developer".
-

View File

@ -1,3 +1,22 @@
-
Create a user as 'HR Attendance Officer'
-
!record {model: res.users, id: res_users_attendance_officer}:
company_id: base.main_company
name: HR Officer
login: ao
password: ao
-
I added groups for HR Attendance Officer.
-
!record {model: res.users, id: res_users_attendance_officer}:
groups_id:
- base.group_hr_user
-
Give the access rights of Hr Officer to test attendance process.
-
!context
uid: 'res_users_attendance_officer'
-
In order to test attendance process in OpenERP, I entry of SignIn of employee.
-

View File

@ -15,5 +15,12 @@
<field name="groups" eval="[(4,ref('base.group_hr_user'))]"/>
</record>
<record id="resource_leaves_officer" model="ir.rule">
<field name="name">Leaves Officer</field>
<field name="model_id" ref="model_resource_calendar_leaves"/>
<field name="domain_force">[(1,'=',1)]</field>
<field name="groups" eval="[(4,ref('base.group_hr_user'))]"/>
</record>
</data>
</openerp>

View File

@ -9,5 +9,9 @@
<field name="domain_force">['|',('company_id','=',False),('company_id','child_of',[user.company_id.id])]</field>
</record>
<record id="base.group_hr_user" model="res.groups">
<field name="implied_ids" eval="[(4, ref('base.group_survey_user'))]"/>
</record>
</data>
</openerp>

View File

@ -1,5 +1,23 @@
-
In Order to test process of Recruitment,
Create a user as 'HR Recruitment Officer'
-
!record {model: res.users, id: res_users_hr_recruitment_officer}:
company_id: base.main_company
name: HR Recruitment Officer
login: hrro
password: hrro
email: hrofcr@yourcompany.com
-
I added groups for HR Recruitment Officer.
-
!record {model: res.users, id: res_users_hr_recruitment_officer}:
groups_id:
- base.group_hr_user
-
In Order to test process of Recruitment so giving HR officer's rights,
-
!context
uid: 'res_users_hr_recruitment_officer'
-
An applicant is interested in the job position. So he sends a resume by email.
-

View File

@ -57,6 +57,7 @@ up a management by affair.
],
'demo': ['hr_timesheet_demo.xml'],
'test': [
'test/hr_timesheet_users.yml',
'test/test_hr_timesheet.yml',
'test/hr_timesheet_report.yml',
'test/hr_timesheet_demo.yml',

View File

@ -1,3 +1,8 @@
-
Give the access rights of Hr Officer to create employee.
-
!context
uid: 'res_hr_timesheet_officer'
-
!record {model: hr.analytic.timesheet, id: working_hours_coding, view: False}:
user_id: base.user_demo

View File

@ -0,0 +1,42 @@
-
Create a user as 'HR timesheet Manager'
-
!record {model: res.users, id: res_hr_timesheet_manager}:
company_id: base.main_company
name: HR timesheet manager
login: hrtm
password: hrtm
-
I added groups for HR timesheet Manager.
-
!record {model: res.users, id: res_hr_timesheet_manager}:
groups_id:
- base.group_hr_manager
-
Create a user as 'HR timesheet Officer'
-
!record {model: res.users, id: res_hr_timesheet_officer}:
company_id: base.main_company
name: HR timesheet Officer
login: hrto
password: hrto
-
I added groups for HR timesheet Officer.
-
!record {model: res.users, id: res_hr_timesheet_officer}:
groups_id:
- base.group_hr_user
-
Create a user as 'Timesheet Employee'
-
!record {model: res.users, id: res_hr_timesheet_employee}:
company_id: base.main_company
name: Timesheet Employee
login: empt
password: empt
-
I added groups for Timesheet Employee.
-
!record {model: res.users, id: res_hr_timesheet_employee}:
groups_id:
- base.group_user

View File

@ -1,6 +1,11 @@
-
In order to test hr_timesheet Module in OpenERP, I make "Sign In/Sign Out for Project" to encode and
track time spent on the different projects.
-
Give the access rights of Hr Officer to create employee.
-
!context
uid: 'res_hr_timesheet_officer'
-
I create employee "Gilles Gravie" as "User".
-
@ -9,6 +14,11 @@
name: Gilles Gravie
parent_id: 'hr.employee_al'
user_id: 'base.user_demo'
-
Give the access rights of Employee to Sign In/Sign Out in Project.
-
!context
uid: 'res_hr_timesheet_employee'
-
On "Sign In/Sign Out by Project" wizard i click on "Sign In/Sign Out" button of this wizard.
-

View File

@ -252,6 +252,7 @@
<field name="property_account_payable" ref="211"/>
<field name="property_account_expense_categ" ref="61_01"/>
<field name="property_account_income_categ" ref="411_01"/>
<field name="currency_id" ref="base.ARS"/>
</record>

View File

@ -2518,6 +2518,7 @@
<field name="property_account_income_categ" ref="chart4000"/>
<field name="property_account_expense" ref="chart5000"/>
<field name="property_account_income" ref="chart4000"/>
<field name="currency_id" ref="base.EUR"/>
</record>

View File

@ -13,6 +13,7 @@
<field name="property_account_expense_categ" ref="a_expense"/>
<field name="property_account_income_categ" ref="a_sale"/>
<field name="spoken_languages" eval="'nl_BE'"/>
<field name="currency_id" ref="base.EUR"/>
</record>

View File

@ -249,6 +249,7 @@
<field name="property_account_payable" ref="211"/>
<field name="property_account_expense_categ" ref="61_01"/>
<field name="property_account_income_categ" ref="411_01"/>
<field name="currency_id" ref="base.BOB"/>
</record>

View File

@ -11,6 +11,7 @@
<field name="property_account_payable" ref="account_template_201010100" />
<field name="property_account_expense_categ" ref="account_template_3010103010000" />
<field name="property_account_income_categ" ref="account_template_3010101010200" />
<field name="currency_id" ref="base.BRL"/>
</record>
</data>

View File

@ -13,6 +13,7 @@
<field name="property_account_payable" ref="chart2111_en"/>
<field name="property_account_income_categ" ref="chart411_en"/>
<field name="property_account_expense_categ" ref="chart5111_en"/>
<field name="currency_id" ref="base.CAD"/>
</record>
<record id="stock.property_stock_account_input_categ" model="ir.property">

View File

@ -12,6 +12,7 @@
<field name="property_account_payable" ref="chart2111_fr"/>
<field name="property_account_income_categ" ref="chart411_fr"/>
<field name="property_account_expense_categ" ref="chart5111_fr"/>
<field name="currency_id" ref="base.CAD"/>
</record>
<record id="stock.property_stock_account_input_categ" model="ir.property">

View File

@ -11812,6 +11812,7 @@
<field name="property_reserve_and_surplus_account" ref="ch_2991"/>
<field name="code_digits" eval="0"/>
<field name="spoken_languages" eval="'it_IT;de_DE'"/>
<field name="currency_id" ref="base.CHF"/>
</record>
</data>
</openerp>

View File

@ -248,6 +248,7 @@
<field name="property_account_payable" ref="211"/>
<field name="property_account_expense_categ" ref="61_01"/>
<field name="property_account_income_categ" ref="411_01"/>
<field name="currency_id" ref="base.AUD"/>
</record>

View File

@ -957,6 +957,7 @@
<field name="property_account_payable" ref="chart2202"/>
<field name="property_account_expense_categ" ref="chart1401"/>
<field name="property_account_income_categ" ref="chart6001"/>
<field name="currency_id" ref="base.CNY"/>
</record>
<!-- 增值税 -->
<record id="vats" model="account.tax.template">

View File

@ -103348,6 +103348,7 @@ participacion, de conformidad con las disposiciones legales vigentes.
<field name="property_account_payable" ref="chart238095999"/>
<field name="property_account_expense_categ" ref="chart529595999"/>
<field name="property_account_income_categ" ref="chart413595999"/>
<field name="currency_id" ref="base.COP"/>
</record>
</data>

View File

@ -16,6 +16,7 @@
<field name="property_account_expense" ref="account_account_template_0_511301"/>
<field name="property_account_income_categ" ref="account_account_template_0_410001"/>
<field name="property_account_expense_categ" ref="account_account_template_0_511301"/>
<field name="currency_id" ref="base.CRC"/>
</record>
<record id="account_chart_template_x" model="account.chart.template">
<field name="name">Costa Rica - Company 1</field>
@ -28,6 +29,7 @@
<field name="property_account_expense" ref="account_account_template_x511301"/>
<field name="property_account_income_categ" ref="account_account_template_x410001"/>
<field name="property_account_expense_categ" ref="account_account_template_x511301"/>
<field name="currency_id" ref="base.CRC"/>
</record>
</data>
</openerp>

View File

@ -12,6 +12,7 @@
<field name="property_account_payable" ref="account_1610"/>
<field name="property_account_expense_categ" ref="account_3400"/>
<field name="property_account_income_categ" ref="account_8400"/>
<field name="currency_id" ref="base.EUR"/>
</record>
</data>
</openerp>

View File

@ -12,6 +12,7 @@
<field name="property_account_payable" ref="chart_skr04_3301"/>
<field name="property_account_expense_categ" ref="chart_skr04_5400"/>
<field name="property_account_income_categ" ref="chart_skr04_4400"/>
<field name="currency_id" ref="base.EUR"/>
</record>
</data>
</openerp>

View File

@ -4202,7 +4202,8 @@
<field name="property_account_receivable" ref="4"/>
<field name="property_account_payable" ref="5"/>
<field name="property_account_expense_categ" ref="60101"/>
<field name="property_account_income_categ" ref="710101"/>
<field name="property_account_income_categ" ref="710101"/>
<field name="currency_id" ref="base.ECS"/>
</record>
</data>

View File

@ -13333,6 +13333,7 @@
<field name="property_account_payable" ref="pgc_4100_child"/>
<field name="property_account_expense_categ" ref="pgc_600_child"/>
<field name="property_account_income_categ" ref="pgc_7000_child"/>
<field name="currency_id" ref="base.EUR"/>
</record>
</data>
</openerp>

View File

@ -12420,6 +12420,7 @@
<field name="property_account_payable" ref="pgc_assoc_4100_child"/>
<field name="property_account_expense_categ" ref="pgc_assoc_600_child"/>
<field name="property_account_income_categ" ref="pgc_assoc_7000_child"/>
<field name="currency_id" ref="base.EUR"/>
</record>
</data>

View File

@ -11464,6 +11464,7 @@
<field name="property_account_payable" ref="pgc_pymes_4100_child"/>
<field name="property_account_expense_categ" ref="pgc_pymes_600_child"/>
<field name="property_account_income_categ" ref="pgc_pymes_7000_child"/>
<field name="currency_id" ref="base.EUR"/>
</record>
</data>
</openerp>

View File

@ -441,6 +441,7 @@
<field name="property_account_payable" ref="fr_pcg_pay"/>
<field name="property_account_expense_categ" ref="pcg_6071"/>
<field name="property_account_income_categ" ref="pcg_7071"/>
<field name="currency_id" ref="base.EUR"/>
</record>
</data>

View File

@ -21,6 +21,7 @@
<field name="property_account_payable" ref="chartgr_50_00"/>
<field name="property_account_expense_categ" ref="chartgr_64_98"/>
<field name="property_account_income_categ" ref="chartgr_71_00"/>
<field name="currency_id" ref="base.EUR"/>
</record>

View File

@ -31,6 +31,7 @@
<field name="property_account_payable" ref="cta210101"/>
<field name="property_account_income_categ" ref="cta410101"/>
<field name="property_account_expense_categ" ref="cta510101"/>
<field name="currency_id" ref="base.QTQ"/>
</record>
<!-- Compras e IVA por Cobrar -->

View File

@ -17,6 +17,7 @@
<field name="property_account_payable" ref="cta210101"/>
<field name="property_account_income_categ" ref="cta410101"/>
<field name="property_account_expense_categ" ref="cta510101"/>
<field name="currency_id" ref="base.HNL"/>
</record>
<!-- Compras e ISV por Cobrar -->

View File

@ -15,6 +15,7 @@
<field name="property_account_expense_categ" ref="kp_rrif4199"/>
<field name="property_account_income_categ" ref="kp_rrif7500"/>
<field name="currency_id" ref="base.HRK"/>
</record>
</data>

View File

@ -550,6 +550,7 @@
<field name="property_account_payable" ref="a215"/>
<field name="property_account_expense_categ" ref="a540"/>
<field name="property_account_income_categ" ref="a311"/>
<field name="currency_id" ref="base.INR"/>
</record>

View File

@ -988,6 +988,7 @@
<field name="property_account_payable" ref="p21000"/>
<field name="property_account_expense_categ" ref="p41010"/>
<field name="property_account_income_categ" ref="p31010"/>
<field name="currency_id" ref="base.INR"/>
</record>
</data>

View File

@ -11,6 +11,7 @@
<field name="property_account_payable" ref="2501"/>
<field name="property_account_expense_categ" ref="4101"/>
<field name="property_account_income_categ" ref="3101"/>
<field name="currency_id" ref="base.EUR"/>
</record>
</data>
</openerp>

View File

@ -13,6 +13,7 @@
<field name="property_account_income_categ" ref="lu_2011_account_7051"/>
<field name="property_account_income_opening" ref="lu_2011_account_141"/>
<field name="property_account_expense_opening" ref="lu_2011_account_141"/>
<field name="currency_id" ref="base.EUR"/>
</record>
</data>

View File

@ -742,7 +742,9 @@
<field name="account_root_id" ref="pcg_0"/>
<field name="tax_code_root_id" ref="vat_ma_tax_root"/>
<field name="bank_account_view_id" ref="pcg_514"/>
<field name="property_account_receivable" ref="pcg_3488"/>
<field name="property_account_payable" ref="pcg_4488"/>
<field name="currency_id" ref="base.MAD"/>
</record>
<record model="account.tax.template" id="tva_exo">

View File

@ -3695,6 +3695,7 @@ Cuentas del plan
<field name="property_account_income_categ" ref="cuenta5111001000"/>
<field name="property_stock_account_input_categ" ref="cuenta4111003000"/>
<field name="property_stock_account_output_categ" ref="cuenta4511003000"/>
<field name="currency_id" ref="base.MXN"/>
</record>

View File

@ -4102,6 +4102,7 @@
<field name="property_account_payable" ref="a_pay"/> <!-- crediteuren -->
<field name="property_account_expense_categ" ref="a_expense"/><!-- aankoop grondstoffen -->
<field name="property_account_income_categ" ref="a_sale"/> <!-- verkoop rekening -->
<field name="currency_id" ref="base.EUR"/>
</record>
<!-- BTW Template

View File

@ -242,6 +242,7 @@
<field name="property_account_payable" ref="211"/>
<field name="property_account_expense_categ" ref="62_01"/>
<field name="property_account_income_categ" ref="411_01"/>
<field name="currency_id" ref="base.PAB"/>
</record>

View File

@ -2257,7 +2257,8 @@
<field name="property_account_receivable" ref="121100"/>
<field name="property_account_payable" ref="421100"/>
<field name="property_account_expense_categ" ref="6011_01"/>
<field name="property_account_income_categ" ref="70111_01"/>
<field name="property_account_income_categ" ref="70111_01"/>
<field name="currency_id" ref="base.PEN"/>
</record>

View File

@ -3202,6 +3202,7 @@
<field name="property_account_payable" ref="chart221000000"/>
<field name="property_account_expense_categ" ref="chart330020000"/>
<field name="property_account_income_categ" ref="chart773010000"/>
<field name="currency_id" ref="base.PLZ"/>
</record>
</data>

View File

@ -16,6 +16,7 @@
<field name="property_account_income_categ" ref="chart_711"/>
<field name="property_account_expense_categ" ref="chart_311"/>
<field name="property_reserve_and_surplus_account" ref="chart_811"/>
<field name="currency_id" ref="base.EUR"/>
</record>
</data>

View File

@ -4587,7 +4587,7 @@
<field name="property_account_payable" ref="ro_pcg_pay"/> <!-- 4011 -->
<field name="property_account_expense_categ" ref="ro_pcg_expense"/> <!-- 607 -->
<field name="property_account_income_categ" ref="ro_pcg_sale"/> <!-- 707 -->
<field name="currency_id" ref="base.ROL"/>
</record>
</data>
</openerp>

View File

@ -1850,6 +1850,7 @@
<field name="property_account_payable" ref="pcg_4011"/>
<field name="property_account_expense_categ" ref="pcg_6011" />
<field name="property_account_income_categ" ref="pcg_7011" />
<field name="currency_id" ref="base.XOF"/>
</record>
<record model="account.tax.code.template" id="tax_col_ht">

View File

@ -477,6 +477,7 @@
<field name="property_account_income_categ" ref="a_sales"/>
<field name="property_account_expense" ref="a_exp_office"/>
<field name="property_account_income" ref="a_sales"/>
<field name="currency_id" ref="base.THB"/>
</record>

View File

@ -12,6 +12,7 @@
<field name="property_account_payable" ref="tr320"/>
<field name="property_account_expense_categ" ref="tr150"/>
<field name="property_account_income_categ" ref="tr600"/>
<field name="currency_id" ref="base.TRL"/>
</record>

View File

@ -6,6 +6,7 @@
<field name="name">Basic Chart of Account</field>
<field name="visible" eval="False" />
<field name="complete_tax_set" eval="False" />
<field name="currency_id" ref="base.USD"/>
</record>
<record id="account_chart_template_cogs" model="account.chart.template">
@ -13,45 +14,53 @@
<field name="visible" eval="False" />
<field name="parent_id" ref="account_chart_template_basic"/>
<field name="complete_tax_set" eval="False" />
<field name="currency_id" ref="base.USD"/>
</record>
<record id="account_chart_template_advertising" model="account.chart.template">
<field name="name">Advertising</field>
<field name="complete_tax_set" eval="False" />
<field name="parent_id" ref="account_chart_template_cogs"/>
<field name="currency_id" ref="base.USD"/>
</record>
<record id="account_chart_template_agriculture" model="account.chart.template">
<field name="name">Agriculture</field>
<field name="complete_tax_set" eval="False" />
<field name="parent_id" ref="account_chart_template_basic"/>
<field name="currency_id" ref="base.USD"/>
</record>
<record id="account_chart_template_construction" model="account.chart.template">
<field name="name">Construction Trades (Plumber, Electrician, HVAC, etc.)</field>
<field name="complete_tax_set" eval="False" />
<field name="parent_id" ref="account_chart_template_cogs"/>
<field name="currency_id" ref="base.USD"/>
</record>
<record id="account_chart_template_financial_service" model="account.chart.template">
<field name="name">Financial Services other than Accounting or Bookkeeping</field>
<field name="complete_tax_set" eval="False" />
<field name="parent_id" ref="account_chart_template_cogs"/>
<field name="currency_id" ref="base.USD"/>
</record>
<record id="account_chart_template_general_service" model="account.chart.template">
<field name="name">General Service-Based Business</field>
<field name="complete_tax_set" eval="False" />
<field name="parent_id" ref="account_chart_template_cogs"/>
<field name="currency_id" ref="base.USD"/>
</record>
<record id="account_chart_template_legal_service" model="account.chart.template">
<field name="name">Legal Services</field>
<field name="complete_tax_set" eval="False" />
<field name="parent_id" ref="account_chart_template_basic"/>
<field name="currency_id" ref="base.USD"/>
</record>
<record id="account_chart_template_general_product" model="account.chart.template">
<field name="name">General Product-Based Business</field>
<field name="complete_tax_set" eval="False" />
<field name="parent_id" ref="account_chart_template_basic"/>
<field name="currency_id" ref="base.USD"/>
</record>
</data>
</openerp>

View File

@ -6,33 +6,43 @@
<field name="account_root_id" ref="coa_basic"/>
<field name="bank_account_view_id" ref="cash_expenditure"/>
<field name="tax_code_root_id" ref="tax_code_chart_root"/>
<field name="property_account_receivable" ref="account_receivable"/>
<field name="property_account_payable" ref="account_payable"/>
<field name="currency_id" ref="base.USD"/>
</record>
<record id="account_chart_template_advertising" model="account.chart.template">
<field name="bank_account_view_id" ref="cash_expenditure"/>
<field name="currency_id" ref="base.USD"/>
</record>
<record id="account_chart_template_agriculture" model="account.chart.template">
<field name="bank_account_view_id" ref="cash_expenditure"/>
<field name="currency_id" ref="base.USD"/>
</record>
<record id="account_chart_template_construction" model="account.chart.template">
<field name="bank_account_view_id" ref="cash_expenditure"/>
<field name="currency_id" ref="base.USD"/>
</record>
<record id="account_chart_template_financial_service" model="account.chart.template">
<field name="bank_account_view_id" ref="cash_expenditure"/>
<field name="currency_id" ref="base.USD"/>
</record>
<record id="account_chart_template_general_service" model="account.chart.template">
<field name="bank_account_view_id" ref="cash_expenditure"/>
<field name="currency_id" ref="base.USD"/>
</record>
<record id="account_chart_template_legal_service" model="account.chart.template">
<field name="bank_account_view_id" ref="cash_expenditure"/>
<field name="currency_id" ref="base.USD"/>
</record>
<record id="account_chart_template_general_product" model="account.chart.template">
<field name="bank_account_view_id" ref="cash_expenditure"/>
<field name="currency_id" ref="base.USD"/>
</record>
</data>
</openerp>

View File

@ -1,5 +1,6 @@
<openerp>
<data noupdate="1">
<record id="account.action_wizard_multi_chart_todo" model="ir.actions.todo">
<field name="state">open</field>
</record>

View File

@ -1895,6 +1895,7 @@
<field name="property_account_payable" ref="uy_code_21100"/>
<field name="property_account_income_categ" ref="uy_code_4100"/>
<field name="property_account_expense_categ" ref="uy_code_5100"/>
<field name="currency_id" ref="base.UYP"/>
</record>

View File

@ -3315,6 +3315,7 @@
<field name="property_account_payable" ref="account_activa_account_2122001"/>
<field name="property_account_expense_categ" ref="account_activa_account_7151001"/>
<field name="property_account_income_categ" ref="account_activa_account_5111001"/>
<field name="currency_id" ref="base.VUB"/>
</record>
</data>
</openerp>

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