Skip to content

Commit

Permalink
[MERGE] forward port branch saas-11.3 up to 5086031
Browse files Browse the repository at this point in the history
Note: 1aacc96 has been ignored and will
be forward-ported later
  • Loading branch information
KangOl committed Jun 15, 2018
2 parents 8a03563 + 5086031 commit 73652a0
Show file tree
Hide file tree
Showing 129 changed files with 1,227 additions and 526 deletions.
7 changes: 4 additions & 3 deletions addons/account/i18n/ru.po
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,14 @@
# Yuriy Ney <k_wizard@mail.ru>, 2017
# Yuriy Ney <kwizardn@gmail.com>, 2018
# sergeiruzkiicode <sergei.ruzki@icode.by>, 2018
# Илья Пономарев <horochiy92@gmail.com>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server saas~11.2\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-03-22 14:10+0000\n"
"PO-Revision-Date: 2018-03-22 14:10+0000\n"
"Last-Translator: sergeiruzkiicode <sergei.ruzki@icode.by>, 2018\n"
"Last-Translator: Илья Пономарев <horochiy92@gmail.com>, 2018\n"
"Language-Team: Russian (https://www.transifex.com/odoo/teams/41243/ru/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
Expand Down Expand Up @@ -4790,12 +4791,12 @@ msgstr ""
#. module: account
#: model:ir.ui.view,arch_db:account.res_config_settings_view_form
msgid "Import your bank statements in CAMT.053"
msgstr ""
msgstr "Импорт банковской выписки в формате CAMT.053"

#. module: account
#: model:ir.ui.view,arch_db:account.res_config_settings_view_form
msgid "Import your bank statements in CSV"
msgstr ""
msgstr "Импорт Банковской Выписки в формате CSV"

#. module: account
#: model:ir.ui.view,arch_db:account.res_config_settings_view_form
Expand Down
13 changes: 10 additions & 3 deletions addons/account/models/account_invoice.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ def _get_sequence_prefix(self):
""" computes the prefix of the number that will be assigned to the first invoice/bill/refund of a journal, in order to
let the user manually change it.
"""
if not self.env.user._is_admin():
if not self.env.user._is_system():
for invoice in self:
invoice.sequence_number_next_prefix = False
invoice.sequence_number_next = ''
Expand Down Expand Up @@ -1629,6 +1629,13 @@ def get_invoice_line_account(self, type, product, fpos, company):
return accounts['income']
return accounts['expense']

def _set_currency(self):
company = self.invoice_id.company_id
currency = self.invoice_id.currency_id
if company and currency:
if company.currency_id != currency:
self.price_unit = self.price_unit * currency.with_context(dict(self._context or {}, date=self.invoice_id.date_invoice)).rate

def _set_taxes(self):
""" Used in on_change to set taxes and price."""
if self.invoice_id.type in ('out_invoice', 'out_refund'):
Expand All @@ -1647,8 +1654,10 @@ def _set_taxes(self):
prec = self.env['decimal.precision'].precision_get('Product Price')
if not self.price_unit or float_compare(self.price_unit, self.product_id.standard_price, precision_digits=prec) == 0:
self.price_unit = fix_price(self.product_id.standard_price, taxes, fp_taxes)
self._set_currency()
else:
self.price_unit = fix_price(self.product_id.lst_price, taxes, fp_taxes)
self._set_currency()

@api.onchange('product_id')
def _onchange_product_id(self):
Expand Down Expand Up @@ -1697,8 +1706,6 @@ def _onchange_product_id(self):
domain['uom_id'] = [('category_id', '=', product.uom_id.category_id.id)]

if company and currency:
if company.currency_id != currency:
self.price_unit = self.price_unit * currency.with_context(dict(self._context or {}, date=self.invoice_id.date_invoice)).rate

if self.uom_id and self.uom_id.id != product.uom_id.id:
self.price_unit = product.uom_id._compute_price(self.price_unit, self.uom_id)
Expand Down
2 changes: 1 addition & 1 deletion addons/account/models/res_config_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ResConfigSettings(models.TransientModel):
'account.journal',
related='company_id.currency_exchange_journal_id',
string="Exchange Gain or Loss Journal",
domain=[('type', '=', 'general')],
domain="[('company_id', '=', company_id), ('type', '=', 'general')]",
help='The accounting journal where automatic exchange differences will be registered')
has_chart_of_accounts = fields.Boolean(compute='_compute_has_chart_of_accounts', string='Company has a chart of accounts')
chart_template_id = fields.Many2one('account.chart.template', string='Template',
Expand Down
12 changes: 7 additions & 5 deletions addons/account/views/account_journal_dashboard_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -248,14 +248,16 @@
<span><t t-esc="dashboard.account_balance"/></span>
</div>
</div>
<div class="row" name="latest_statement" t-if="dashboard.last_balance != dashboard.account_balance">
<div class="col-xs-7">
<t t-if="dashboard.last_balance != dashboard.account_balance">
<div class="row" name="latest_statement">
<div class="col-xs-7">
<span title="Latest Statement">Latest Statement</span>
</div>
<div class="col-xs-5 text-right">
</div>
<div class="col-xs-5 text-right">
<span><t t-esc="dashboard.last_balance"/></span>
</div>
</div>
</div>
</t>
</div>
</t>
<t t-name="JournalBodySalePurchase" id="account.JournalBodySalePurchase">
Expand Down
2 changes: 1 addition & 1 deletion addons/account/views/report_journal.xml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<td><span t-field="aml.date"/></td>
<td><span t-field="aml.account_id.code"/></td>
<td><span t-esc="aml.sudo().partner_id and aml.sudo().partner_id.name and aml.sudo().partner_id.name[:23] or ''"/></td>
<td><span t-esc="aml.name[:35]"/></td>
<td><span t-esc="aml.name and aml.name[:35]"/></td>
<td><span t-esc="aml.debit" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></td>
<td><span t-esc="aml.credit" t-options="{'widget': 'monetary', 'display_currency': res_company.currency_id}"/></td>
<td t-if="data['form']['amount_currency'] and aml.amount_currency">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ def import_file(self):
# Create the bank statements
statement_ids, notifications = self._create_bank_statements(stmts_vals)
# Now that the import worked out, set it as the bank_statements_source of the journal
journal.bank_statements_source = 'file_import'
if journal.bank_statements_source != 'file_import':
# Use sudo() because only 'account.group_account_manager'
# has write access on 'account.journal', but 'account.group_account_user'
# must be able to import bank statement files
journal.sudo().bank_statements_source = 'file_import'
# Finally dispatch to reconciliation interface
action = self.env.ref('account.action_bank_reconcile_bank_statements')
return {
Expand Down
5 changes: 4 additions & 1 deletion addons/account_check_printing/i18n/tr.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@
# Ayhan KIZILTAN <akiziltan76@hotmail.com>, 2018
# Martin Trigaux, 2018
# Alexander B. <road2monstercat@gmail.com>, 2018
# Umur Akın <umura@projetgrup.com>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server saas~11.2\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-03-22 14:10+0000\n"
"PO-Revision-Date: 2018-03-22 14:10+0000\n"
"Last-Translator: Alexander B. <road2monstercat@gmail.com>, 2018\n"
"Last-Translator: Umur Akın <umura@projetgrup.com>, 2018\n"
"Language-Team: Turkish (https://www.transifex.com/odoo/teams/41243/tr/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
Expand Down Expand Up @@ -333,6 +334,8 @@ msgid ""
"The ISO country code in two chars. \n"
"You can use this field for quick search."
msgstr ""
"İki karakterde ISO ülke kodu.\n"
"Hızlı arama için bu alanı kullanabilirsiniz."

#. module: account_check_printing
#: code:addons/account_check_printing/models/account_journal.py:26
Expand Down
2 changes: 1 addition & 1 deletion addons/base_address_city/models/res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class Partner(models.Model):
_inherit = 'res.partner'

country_enforce_cities = fields.Boolean(related='country_id.enforce_cities')
country_enforce_cities = fields.Boolean(related='country_id.enforce_cities', readonly=True)
city_id = fields.Many2one('res.city', string='City of Address')

@api.onchange('city_id')
Expand Down
5 changes: 4 additions & 1 deletion addons/board/static/src/js/favorite_menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,10 @@ FavoriteMenu.include({
})
.then(function (r) {
if (r) {
self.do_notify(_.str.sprintf(_t("'%s' added to dashboard"), name), '');
self.do_notify(
_.str.sprintf(_t("'%s' added to dashboard"), name),
_t('Please refresh your browser for the changes to take effect.')
);
} else {
self.do_warn(_t("Could not add filter to dashboard"));
}
Expand Down
2 changes: 2 additions & 0 deletions addons/crm/models/crm_lead.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ def _onchange_partner_id(self):
@api.model
def _onchange_user_values(self, user_id):
""" returns new values when user_id has changed """
if not user_id:
return {}
if user_id and self._context.get('team_id'):
team = self.env['crm.team'].browse(self._context['team_id'])
if user_id in team.member_ids.ids:
Expand Down
2 changes: 1 addition & 1 deletion addons/event/i18n/tr.po
Original file line number Diff line number Diff line change
Expand Up @@ -1551,7 +1551,7 @@ msgstr ""
#. module: event
#: model:ir.model,name:event.model_event_confirm
msgid "event.confirm"
msgstr ""
msgstr "event.confirm"

#. module: event
#: code:addons/event/models/event.py:503
Expand Down
7 changes: 6 additions & 1 deletion addons/event/models/event.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,9 +444,14 @@ def _onchange_partner(self):
@api.multi
def message_get_suggested_recipients(self):
recipients = super(EventRegistration, self).message_get_suggested_recipients()
public_users = self.env['res.users'].sudo()
public_groups = self.env.ref("base.group_public", raise_if_not_found=False)
if public_groups:
public_users = public_groups.sudo().with_context(active_test=False).mapped("users")
try:
for attendee in self:
if attendee.partner_id:
is_public = attendee.sudo().with_context(active_test=False).partner_id.user_ids in public_users if public_users else False
if attendee.partner_id and not is_public:
attendee._message_add_suggested_recipient(recipients, partner=attendee.partner_id, reason=_('Customer'))
elif attendee.email:
attendee._message_add_suggested_recipient(recipients, email=attendee.email, reason=_('Customer Email'))
Expand Down
2 changes: 2 additions & 0 deletions addons/event/models/res_partner.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ class ResPartner(models.Model):
event_count = fields.Integer("Events Count", compute='_compute_event_count', help="Number of events the partner has participated.")

def _compute_event_count(self):
if not self.user_has_groups('event.group_event_user'):
return
for partner in self:
partner.event_count = self.env['event.event'].search_count([('registration_ids.partner_id', 'child_of', partner.ids)])

Expand Down
2 changes: 1 addition & 1 deletion addons/event/report/event_event_templates.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<img t-att-src="'data:image/png;base64,%s' % to_text(o.event_id.organizer_id.company_id.logo_web)" style="max-height:1cm; max-width:4cm;"/>
</span>
<h5 t-field="o.event_id.name"/>
<h5>( <i class="fa fa-clock-o"></i> <span itemprop="startDate" t-field="o.event_id.date_begin" t-options='{"hide_seconds": True}'> </span> <i>to</i> <span itemprop="endDate" t-field="o.event_id.date_end" t-options='{"hide_seconds": True}'> </span> )</h5>
<h5>( <i class="fa fa-clock-o"></i> <span itemprop="startDate" t-field="o.event_id.with_context(tz=o.event_id.date_tz).date_begin" t-options='{"hide_seconds": True}'> </span> <i>to</i> <span itemprop="endDate" t-field="o.event_id.with_context(tz=o.event_id.date_tz).date_end" t-options='{"hide_seconds": True}'> </span> )</h5>
</div>
<div class="row">
<div class="col-xs-12 text-center" id="o_event_name">
Expand Down
1 change: 1 addition & 0 deletions addons/event/views/res_partner_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<button class="oe_stat_button"
type="object"
icon="fa-ticket"
groups="event.group_event_user"
name="action_event_view" attrs="{'invisible': [('event_count','=', 0)]}">
<field string="Events" name="event_count" widget="statinfo"/>
</button>
Expand Down
2 changes: 1 addition & 1 deletion addons/event_sale/i18n/tr.po
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ msgstr "Lütfen kayıtlarla ilgili ayrıntıları veriniz."
#. module: event_sale
#: model:ir.model,name:event_sale.model_registration_editor
msgid "registration.editor"
msgstr ""
msgstr "registration.editor"

#. module: event_sale
#: model:ir.model,name:event_sale.model_registration_editor_line
Expand Down
2 changes: 2 additions & 0 deletions addons/fleet/i18n/tr.po
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ msgstr "Sözleşmenin hala geçerli olup olmadığını seçin"
msgid ""
"Choose whether the service refer to contracts, vehicle services or both"
msgstr ""
"Hizmetin sözleşmelerle mi, araç hizmetleriyle mi ya da her ikisiyle de mi "
"ilgili olduğunu seçin"

#. module: fleet
#: model:ir.ui.view,arch_db:fleet.fleet_vehicle_log_contract_view_form
Expand Down
2 changes: 1 addition & 1 deletion addons/google_calendar/i18n/tr.po
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ msgstr "Tokenınız geçersiz ya da iptal edilmiş!"
#. module: google_calendar
#: model:ir.model,name:google_calendar.model_google_calendar
msgid "google.calendar"
msgstr ""
msgstr "google.calendar"

#. module: google_calendar
#: model:ir.model,name:google_calendar.model_res_config_settings
Expand Down
2 changes: 1 addition & 1 deletion addons/hr_holidays/models/hr_leave.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def _default_employee(self):
help='Number of hours of the leave request according to your working schedule.')
meeting_id = fields.Many2one('calendar.event', string='Meeting')

parent_id = fields.Many2one('hr.leave', string='Parent')
parent_id = fields.Many2one('hr.leave', string='Parent', copy=False)
linked_request_ids = fields.One2many('hr.leave', 'parent_id', string='Linked Requests')
department_id = fields.Many2one('hr.department', string='Department', readonly=True, states={'draft': [('readonly', False)], 'confirm': [('readonly', False)]})
category_id = fields.Many2one('hr.employee.category', string='Employee Tag', readonly=True,
Expand Down
29 changes: 15 additions & 14 deletions addons/hr_recruitment/i18n/pt_BR.po
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@
# danimaribeiro <danimaribeiro@gmail.com>, 2016
# Adriel Kotviski <kotviski@gmail.com>, 2016
# Silmar <pinheirosilmar@gmail.com>, 2017
# Thiago Alves Cavalcante <tkramer.tk@gmail.com>, 2018
msgid ""
msgstr ""
"Project-Id-Version: Odoo Server saas~11.2\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-03-22 14:10+0000\n"
"PO-Revision-Date: 2018-03-22 14:10+0000\n"
"Last-Translator: Silmar <pinheirosilmar@gmail.com>, 2017\n"
"Last-Translator: Thiago Alves Cavalcante <tkramer.tk@gmail.com>, 2018\n"
"Language-Team: Portuguese (Brazil) (https://www.transifex.com/odoo/teams/41243/pt_BR/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
Expand Down Expand Up @@ -414,7 +415,7 @@ msgstr "<span class=\"o_stat_text\">Rastreadores</span>"
#. module: hr_recruitment
#: model:ir.ui.view,arch_db:hr_recruitment.view_hr_recruitment_stage_kanban
msgid "<span>Folded in Recruitment Pipe: </span>"
msgstr ""
msgstr "Dobrado na Lista de Recrutamento"

#. module: hr_recruitment
#: model:ir.model.fields,help:hr_recruitment.field_hr_job__alias_defaults
Expand Down Expand Up @@ -484,7 +485,7 @@ msgstr "Modelo Apelidado"
#. module: hr_recruitment
#: model:ir.ui.menu,name:hr_recruitment.menu_crm_case_categ_all_app
msgid "All Applications"
msgstr ""
msgstr "Todas as aplicações"

#. module: hr_recruitment
#: model:ir.model,name:hr_recruitment.model_hr_applicant
Expand Down Expand Up @@ -608,7 +609,7 @@ msgstr "Anexos"
#. module: hr_recruitment
#: model:ir.model.fields,field_description:hr_recruitment.field_hr_recruitment_stage__template_id
msgid "Automated Email"
msgstr ""
msgstr "E-mail Automatizado"

#. module: hr_recruitment
#: model:ir.model.fields,field_description:hr_recruitment.field_hr_applicant__availability
Expand Down Expand Up @@ -650,7 +651,7 @@ msgstr "Categoria de candidato"
#: code:addons/hr_recruitment/static/src/js/tour.js:16
#, python-format
msgid "Click here to create a new job position."
msgstr ""
msgstr "Clique aqui para criar um novo cargo."

#. module: hr_recruitment
#: model:ir.model.fields,field_description:hr_recruitment.field_hr_applicant__date_closed
Expand Down Expand Up @@ -722,7 +723,7 @@ msgstr "Criar Funcionário"
#: model:ir.actions.act_window,name:hr_recruitment.create_job_simple
#: model:ir.ui.view,arch_db:hr_recruitment.hr_job_simple_form
msgid "Create a Job Position"
msgstr ""
msgstr "Criar um Cargo"

#. module: hr_recruitment
#: model:ir.ui.view,arch_db:hr_recruitment.hr_recruitment_source_tree
Expand Down Expand Up @@ -915,7 +916,7 @@ msgstr "Apelido de E-mail"
#. module: hr_recruitment
#: model:ir.ui.view,arch_db:hr_recruitment.hr_job_survey
msgid "Email alias"
msgstr ""
msgstr "Apelido de email"

#. module: hr_recruitment
#: model:ir.model.fields,help:hr_recruitment.field_hr_job__alias_id
Expand Down Expand Up @@ -1039,7 +1040,7 @@ msgstr "Departamento de RH"
#. module: hr_recruitment
#: model:ir.model.fields,field_description:hr_recruitment.field_hr_job__hr_responsible_id
msgid "HR Responsible"
msgstr ""
msgstr "Responsável do RH"

#. module: hr_recruitment
#: model:ir.ui.view,arch_db:hr_recruitment.view_hr_job_kanban
Expand Down Expand Up @@ -1091,7 +1092,7 @@ msgstr "Qualificação Inicial"
#: model:ir.model.fields,field_description:hr_recruitment.field_res_config_settings__module_hr_recruitment_survey
#: model:ir.ui.view,arch_db:hr_recruitment.res_config_settings_view_form
msgid "Interview Forms"
msgstr ""
msgstr "Formulários de Entrevista"

#. module: hr_recruitment
#: code:addons/hr_recruitment/models/hr_job.py:94
Expand All @@ -1104,12 +1105,12 @@ msgstr "Trabalho"
#. module: hr_recruitment
#: model:mail.template,subject:hr_recruitment.email_template_data_applicant_congratulations
msgid "Job Application Confirmation: ${object.job_id.name | safe}"
msgstr ""
msgstr "Confirmação de pedido de emprego: ${object.job_id.name | safe}"

#. module: hr_recruitment
#: model:ir.ui.view,arch_db:hr_recruitment.crm_case_pivot_view_job
msgid "Job Applications"
msgstr ""
msgstr "Solicitações de emprego"

#. module: hr_recruitment
#: model:utm.campaign,name:hr_recruitment.utm_campaign_job
Expand Down Expand Up @@ -1152,12 +1153,12 @@ msgstr "Cargos"
#. module: hr_recruitment
#: model:ir.ui.view,arch_db:hr_recruitment.res_config_settings_view_form
msgid "Job Posting"
msgstr ""
msgstr "Anúncio de emprego"

#. module: hr_recruitment
#: model:ir.model.fields,field_description:hr_recruitment.field_hr_recruitment_stage__job_id
msgid "Job Specific"
msgstr ""
msgstr "Especificação de trabalho"

#. module: hr_recruitment
#: model:ir.ui.view,arch_db:hr_recruitment.hr_applicant_view_search
Expand Down Expand Up @@ -1228,7 +1229,7 @@ msgstr ""
#, python-format
msgid ""
"Let's have a look at the <b>applications pipeline</b> for this job position."
msgstr ""
msgstr "Vamos dar uma olhada na <b>lista de exigências</b> para este cargo. "

#. module: hr_recruitment
#: model:res.groups,name:hr_recruitment.group_hr_recruitment_manager
Expand Down
Loading

0 comments on commit 73652a0

Please sign in to comment.