Skip to content

Commit

Permalink
[MERGE] forward port branch saas-12.1 up to ff1bca3
Browse files Browse the repository at this point in the history
  • Loading branch information
KangOl committed Mar 14, 2019
2 parents fec8366 + ff1bca3 commit bbedcdb
Show file tree
Hide file tree
Showing 78 changed files with 1,291 additions and 545 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Expand Up @@ -22,6 +22,7 @@ recursive-include odoo *.otf
recursive-include odoo *.pdf
recursive-include odoo *.png
recursive-include odoo *.po
recursive-include odoo *.pot
recursive-include odoo *.rml
recursive-include odoo *.rng
recursive-include odoo *.rst
Expand Down
2 changes: 1 addition & 1 deletion addons/account/models/account.py
Expand Up @@ -107,7 +107,7 @@ def _check_user_type_id(self):

@api.model
def _search_new_account_code(self, company, digits, prefix):
for num in range(1, 100):
for num in range(1, 10000):
new_code = str(prefix.ljust(digits - 1, '0')) + str(num)
rec = self.search([('code', '=', new_code), ('company_id', '=', company.id)], limit=1)
if not rec:
Expand Down
4 changes: 3 additions & 1 deletion addons/account/models/account_payment.py
Expand Up @@ -665,7 +665,9 @@ def action_validate_invoice_payment(self):
if any(len(record.invoice_ids) != 1 for record in self):
# For multiple invoices, there is account.register.payments wizard
raise UserError(_("This method should only be called to process a single invoice's payment."))
return self.post()
res = self.post()
self.mapped('payment_transaction_id').filtered(lambda x: x.state == 'done' and not x.is_processed)._post_process_after_done()
return res

def _create_payment_entry(self, amount):
""" Create a journal entry corresponding to a payment, if the payment references invoice(s) they are reconciled.
Expand Down
2 changes: 1 addition & 1 deletion addons/account/static/src/xml/account_reconciliation.xml
Expand Up @@ -63,7 +63,7 @@
</t>
</p>
<t t-if="context &amp;&amp; context.active_model">
<p t-if="context['active_model'] === 'account.journal' || context['active_model'] === 'account.bank.statement'" class="actions_buttons">
<p t-if="context['active_model'] === 'account.journal' || context['active_model'] === 'account.bank.statement' || context['active_model'] === 'account.bank.statement.import'" class="actions_buttons">
<t t-if="context.journal_id">
<button class="button_back_to_statement btn btn-secondary" t-att-data_journal_id='context.journal_id'>Go to bank statement(s)</button>
</t>
Expand Down
2 changes: 1 addition & 1 deletion addons/account/views/report_invoice.xml
Expand Up @@ -3,7 +3,7 @@
<data>
<template id="report_invoice_document">
<t t-call="web.external_layout">
<t t-set="o" t-value="o.with_context({'lang': lang})"/>
<t t-set="o" t-value="o.with_context(lang=lang)" />
<t t-set="address">
<address t-field="o.partner_id" t-options='{"widget": "contact", "fields": ["address", "name"], "no_marker": True}' />
<div t-if="o.partner_id.vat" class="mt16"><t t-esc="o.company_id.country_id.vat_label or 'Tax ID'"/>: <span t-field="o.partner_id.vat"/></div>
Expand Down
2 changes: 1 addition & 1 deletion addons/base_automation/models/base_automation.py
Expand Up @@ -249,7 +249,7 @@ def _write(self, vals, **kw):
# read old values before the update
old_values = {
old_vals.pop('id'): old_vals
for old_vals in records.read(list(vals))
for old_vals in (records.read(list(vals)) if vals else [])
}
# call original method
_write.origin(records, vals, **kw)
Expand Down
2 changes: 1 addition & 1 deletion addons/hr_holidays/tests/test_leave_requests.py
Expand Up @@ -138,7 +138,7 @@ def test_accrual_validity_time_valid(self):
'number_of_days': 1,
})

@mute_logger('odoo.models.unlink', 'odoo.addons.mail.models.mail_mail', 'odoo.models')
@mute_logger('odoo.models.unlink', 'odoo.addons.mail.models.mail_mail')
def test_accrual_validity_time_not_valid(self):
""" Employee ask leav during a not valid validity time """
with self.assertRaises(ValidationError):
Expand Down
4 changes: 2 additions & 2 deletions addons/hr_recruitment/models/hr_recruitment.py
Expand Up @@ -224,12 +224,12 @@ def onchange_job_id(self):
def _onchange_job_id_internal(self, job_id):
department_id = False
user_id = False
stage_id = self.stage_id.id
stage_id = self.stage_id.id or self._context.get('default_stage_id')
if job_id:
job = self.env['hr.job'].browse(job_id)
department_id = job.department_id.id
user_id = job.user_id.id
if not self.stage_id:
if not stage_id:
stage_ids = self.env['hr.recruitment.stage'].search([
'|',
('job_id', '=', False),
Expand Down
694 changes: 347 additions & 347 deletions addons/l10n_es/data/account.account.template-common.csv

Large diffs are not rendered by default.

104 changes: 52 additions & 52 deletions addons/l10n_es/data/account.account.template-full.csv

Large diffs are not rendered by default.

26 changes: 13 additions & 13 deletions addons/l10n_es/data/account.account.template-pymes.csv
@@ -1,20 +1,20 @@
"id","name","code","user_type_id/id","chart_template_id/id","group_id/id"
"account_pymes_100","Capital social","100","account.data_account_type_equity","l10n_es.account_chart_template_pymes","l10n_es.account_group_100"
"account_pymes_1030","Socios por desembolsos no exigidos, capital social","1030","account.data_account_type_equity","l10n_es.account_chart_template_pymes","l10n_es.account_group_103"
"account_pymes_1034","Socios por desembolsos no exigidos, capital pendiente de inscripción","1034","account.data_account_type_equity","l10n_es.account_chart_template_pymes","l10n_es.account_group_103"
"account_pymes_1040","Socios por aportaciones no dinerarias pendientes, capital social","1040","account.data_account_type_equity","l10n_es.account_chart_template_pymes","l10n_es.account_group_104"
"account_pymes_1044","Socios por aportaciones no dinerarias pendientes, capital pendiente de inscripción","1044","account.data_account_type_equity","l10n_es.account_chart_template_pymes","l10n_es.account_group_104"
"account_pymes_1030","Socios por desembolsos no exigidos, capital social","1030","account.data_account_type_equity","l10n_es.account_chart_template_pymes","l10n_es.account_group_1030"
"account_pymes_1034","Socios por desembolsos no exigidos, capital pendiente de inscripción","1034","account.data_account_type_equity","l10n_es.account_chart_template_pymes","l10n_es.account_group_1034"
"account_pymes_1040","Socios por aportaciones no dinerarias pendientes, capital social","1040","account.data_account_type_equity","l10n_es.account_chart_template_pymes","l10n_es.account_group_1040"
"account_pymes_1044","Socios por aportaciones no dinerarias pendientes, capital pendiente de inscripción","1044","account.data_account_type_equity","l10n_es.account_chart_template_pymes","l10n_es.account_group_1044"
"account_pymes_120","Remanente","120","account.data_account_type_equity","l10n_es.account_chart_template_pymes","l10n_es.account_group_120"
"account_pymes_121","Resultados negativos de ejercicios anteriores","121","account.data_account_type_equity","l10n_es.account_chart_template_pymes","l10n_es.account_group_121"
"account_pymes_129","Resultado del ejercicio","129","account.data_unaffected_earnings","l10n_es.account_chart_template_pymes","l10n_es.account_group_129"
"account_pymes_130","Subvenciones oficiales de capital","130","account.data_account_type_equity","l10n_es.account_chart_template_pymes","l10n_es.account_group_130"
"account_pymes_132","Otras subvenciones, donaciones y legados","132","account.data_account_type_equity","l10n_es.account_chart_template_pymes","l10n_es.account_group_132"
"account_pymes_2403","Participaciones en empresas del grupo","2403","account.data_account_type_fixed_assets","l10n_es.account_chart_template_pymes","l10n_es.account_group_240"
"account_pymes_2404","Participaciones en empresas asociadas","2404","account.data_account_type_fixed_assets","l10n_es.account_chart_template_pymes","l10n_es.account_group_240"
"account_pymes_2405","Participaciones en otras partes vinculadas","2405","account.data_account_type_fixed_assets","l10n_es.account_chart_template_pymes","l10n_es.account_group_240"
"account_pymes_2493","Desembolsos pendientes sobre participaciones en empresas del grupo","2493","account.data_account_type_fixed_assets","l10n_es.account_chart_template_pymes","l10n_es.account_group_249"
"account_pymes_2494","Desembolsos pendientes sobre participaciones en empresas asociadas","2494","account.data_account_type_fixed_assets","l10n_es.account_chart_template_pymes","l10n_es.account_group_249"
"account_pymes_2495","Desembolsos pendientes sobre participaciones en otras partes vinculadas","2495","account.data_account_type_fixed_assets","l10n_es.account_chart_template_pymes","l10n_es.account_group_249"
"account_pymes_2403","Participaciones en empresas del grupo","2403","account.data_account_type_fixed_assets","l10n_es.account_chart_template_pymes","l10n_es.account_group_2403"
"account_pymes_2404","Participaciones en empresas asociadas","2404","account.data_account_type_fixed_assets","l10n_es.account_chart_template_pymes","l10n_es.account_group_2404"
"account_pymes_2405","Participaciones en otras partes vinculadas","2405","account.data_account_type_fixed_assets","l10n_es.account_chart_template_pymes","l10n_es.account_group_2405"
"account_pymes_2493","Desembolsos pendientes sobre participaciones en empresas del grupo","2493","account.data_account_type_fixed_assets","l10n_es.account_chart_template_pymes","l10n_es.account_group_2493"
"account_pymes_2494","Desembolsos pendientes sobre participaciones en empresas asociadas","2494","account.data_account_type_fixed_assets","l10n_es.account_chart_template_pymes","l10n_es.account_group_2494"
"account_pymes_2495","Desembolsos pendientes sobre participaciones en otras partes vinculadas","2495","account.data_account_type_fixed_assets","l10n_es.account_chart_template_pymes","l10n_es.account_group_2495"
"account_pymes_255","Activos por derivados financieros","255","account.data_account_type_fixed_assets","l10n_es.account_chart_template_pymes","l10n_es.account_group_255"
"account_pymes_2935","Deterioro de valor de participaciones a largo plazo en otras partes vinculadas","2935","account.data_account_type_fixed_assets","l10n_es.account_chart_template_pymes","l10n_es.account_group_293"
"account_pymes_296","Deterioro de valor de participaciones en el patrimonio neto a largo plazo","296","account.data_account_type_fixed_assets","l10n_es.account_chart_template_pymes","l10n_es.account_group_296"
Expand All @@ -23,8 +23,8 @@
"account_pymes_5935","Deterioro de valor de participaciones a corto plazo en otras partes vinculadas","5935","account.data_account_type_current_assets","l10n_es.account_chart_template_pymes","l10n_es.account_group_593"
"account_pymes_596","Deterioro de valor de participaciones a corto plazo","596","account.data_account_type_current_assets","l10n_es.account_chart_template_pymes","l10n_es.account_group_596"
"account_pymes_650","Pérdidas de créditos comerciales incobrables","650","account.data_account_type_expenses","l10n_es.account_chart_template_pymes","l10n_es.account_group_650"
"account_pymes_6510","Beneficio transferido (gestor)","6510","account.data_account_type_expenses","l10n_es.account_chart_template_pymes","l10n_es.account_group_651"
"account_pymes_6511","Pérdida soportada (partícipe o asociado no gestor)","6511","account.data_account_type_expenses","l10n_es.account_chart_template_pymes","l10n_es.account_group_651"
"account_pymes_6510","Beneficio transferido (gestor)","6510","account.data_account_type_expenses","l10n_es.account_chart_template_pymes","l10n_es.account_group_6510"
"account_pymes_6511","Pérdida soportada (partícipe o asociado no gestor)","6511","account.data_account_type_expenses","l10n_es.account_chart_template_pymes","l10n_es.account_group_6511"
"account_pymes_659","Otras pérdidas en gestión corriente","659","account.data_account_type_expenses","l10n_es.account_chart_template_pymes","l10n_es.account_group_659"
"account_pymes_663","Pérdidas por valoración de instrumentos financieros por su valor razonable","663","account.data_account_type_expenses","l10n_es.account_chart_template_pymes","l10n_es.account_group_663"
"account_pymes_671","Pérdidas procedentes del inmovilizado material","671","account.data_account_type_expenses","l10n_es.account_chart_template_pymes","l10n_es.account_group_671"
Expand All @@ -34,4 +34,4 @@
"account_pymes_791","Reversión del deterioro del inmovilizado material","791","account.data_account_type_revenue","l10n_es.account_chart_template_pymes","l10n_es.account_group_791"
"account_pymes_794","Reversión del deterioro de créditos por operaciones comerciales","794","account.data_account_type_revenue","l10n_es.account_chart_template_pymes","l10n_es.account_group_794"
"account_pymes_7962","Reversión del deterioro de participaciones en instrumentos de patrimonio neto a largo plazo, otras partes vinculadas","7962","account.data_account_type_revenue","l10n_es.account_chart_template_pymes","l10n_es.account_group_796"
"account_pymes_7963","Reversión del deterioro de participaciones en instrumentos de patrimonio neto a largo plazo, otras empresas","7963","account.data_account_type_revenue","l10n_es.account_chart_template_pymes","l10n_es.account_group_796"
"account_pymes_7963","Reversión del deterioro de participaciones en instrumentos de patrimonio neto a largo plazo, otras empresas","7963","account.data_account_type_revenue","l10n_es.account_chart_template_pymes","l10n_es.account_group_796"
25 changes: 25 additions & 0 deletions addons/l10n_es/data/account_group.xml
Expand Up @@ -110,6 +110,11 @@
<field name="name">Reservas para acciones o participaciones de la sociedad dominante</field>
<field name="parent_id" ref="l10n_es.account_group_114"/>
</record>
<record id="account_group_1141" model="account.group">
<field name="code_prefix">1141</field>
<field name="name">Reservas estatutarias</field>
<field name="parent_id" ref="l10n_es.account_group_114"/>
</record>
<record id="account_group_1142" model="account.group">
<field name="code_prefix">1142</field>
<field name="name">Reserva por capital amortizado</field>
Expand Down Expand Up @@ -450,6 +455,11 @@
<field name="name">Pasivos por derivados financieros a largo plazo</field>
<field name="parent_id" ref="l10n_es.account_group_17"/>
</record>
<record id="account_group_1760" model="account.group">
<field name="code_prefix">1760</field>
<field name="name">Pasivos por derivados financieros</field>
<field name="parent_id" ref="l10n_es.account_group_176"/>
</record>
<record id="account_group_1765" model="account.group">
<field name="code_prefix">1765</field>
<field name="name">Pasivos por derivados financieros a largo plazo, cartera de negociación</field>
Expand Down Expand Up @@ -1757,6 +1767,11 @@
<field name="name">Hacienda Pública, acreedora por subvenciones a reintegrar</field>
<field name="parent_id" ref="l10n_es.account_group_475"/>
</record>
<record id="account_group_4759" model="account.group">
<field name="code_prefix">4759</field>
<field name="name">Hacienda Pública, acreedora por otros conceptos</field>
<field name="parent_id" ref="l10n_es.account_group_475"/>
</record>
<record id="account_group_476" model="account.group">
<field name="code_prefix">476</field>
<field name="name">Organismos de la Seguridad Social, acreedores</field>
Expand Down Expand Up @@ -3200,6 +3215,16 @@
<field name="name">Intereses por operaciones de «factoring» con entidades de crédito del grupo</field>
<field name="parent_id" ref="l10n_es.account_group_665"/>
</record>
<record id="account_group_6655" model="account.group">
<field name="code_prefix">6655</field>
<field name="name">Intereses por operaciones de "factoring" con entidades de crédito asociadas</field>
<field name="parent_id" ref="l10n_es.account_group_665"/>
</record>
<record id="account_group_6656" model="account.group">
<field name="code_prefix">6656</field>
<field name="name">Intereses por operaciones de "factoring" con entidades de crédito vinculadas</field>
<field name="parent_id" ref="l10n_es.account_group_665"/>
</record>
<record id="account_group_6657" model="account.group">
<field name="code_prefix">6657</field>
<field name="name">Intereses por operaciones de «factoring» con otras entidades de crédito</field>
Expand Down
2 changes: 1 addition & 1 deletion addons/l10n_jp/__manifest__.py
Expand Up @@ -5,7 +5,7 @@

{
'name': 'Japan - Accounting',
'version': '2.0',
'version': '2.1',
'category': 'Localization',
'description': """
Expand Down

0 comments on commit bbedcdb

Please sign in to comment.