mirror of
https://gitlab.com/flectra-community/server-ux.git
synced 2024-11-21 13:42:06 +00:00
Automatic Update form OCA2FC Migrator
This commit is contained in:
parent
9a856855ea
commit
7e1a1d515a
@ -12,18 +12,18 @@ addon | version | summary
|
||||
[multi_step_wizard](multi_step_wizard/) | 3.0.1.0.0| Multi-Steps Wizards
|
||||
[base_menu_visibility_restriction](base_menu_visibility_restriction/) | 3.0.1.0.0| Restrict (with groups) menu visibilty
|
||||
[base_substate](base_substate/) | 3.0.1.0.0| Base Sub State
|
||||
[base_technical_features](base_technical_features/) | 3.0.1.0.0| Access to technical features without activating debug mode
|
||||
[base_technical_features](base_technical_features/) | 3.0.1.0.1| Access to technical features without activating debug mode
|
||||
[base_search_custom_field_filter](base_search_custom_field_filter/) | 3.0.1.0.0| Add custom filters for fields via UI
|
||||
[server_action_mass_edit](server_action_mass_edit/) | 3.0.1.0.1| Mass Editing
|
||||
[sequence_reset_period](sequence_reset_period/) | 3.0.1.0.0| Auto-generate yearly/monthly/weekly/daily sequence period ranges
|
||||
[base_optional_quick_create](base_optional_quick_create/) | 3.0.1.0.0| Avoid "quick create" on m2o fields, on a "by model" basis
|
||||
[base_tier_validation_forward](base_tier_validation_forward/) | 3.0.1.0.0| Forward option for base tiers
|
||||
[announcement](announcement/) | 3.0.1.0.0| Notify internal users about relevant organization stuff
|
||||
[base_tier_validation](base_tier_validation/) | 3.0.2.1.3| Implement a validation process based on tiers.
|
||||
[base_tier_validation](base_tier_validation/) | 3.0.2.2.1| Implement a validation process based on tiers.
|
||||
[base_revision](base_revision/) | 3.0.1.0.0| Keep track of revised document
|
||||
[date_range_account](date_range_account/) | 3.0.1.0.0| Add Date Range menu entry in Invoicing app
|
||||
[barcode_action](barcode_action/) | 3.0.1.0.0| Allows to use barcodes as a launcher
|
||||
[date_range](date_range/) | 3.0.1.2.0| Manage all kind of date range
|
||||
[date_range](date_range/) | 3.0.1.2.1| Manage all kind of date range
|
||||
[base_tier_validation_formula](base_tier_validation_formula/) | 3.0.1.0.0| Formulas for Base tier validation
|
||||
|
||||
|
||||
|
@ -6,7 +6,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Odoo Server 16.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"PO-Revision-Date: 2024-04-30 10:35+0000\n"
|
||||
"PO-Revision-Date: 2024-10-21 10:06+0000\n"
|
||||
"Last-Translator: mymage <stefano.consolaro@mymage.it>\n"
|
||||
"Language-Team: none\n"
|
||||
"Language: it\n"
|
||||
@ -14,7 +14,7 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: Weblate 4.17\n"
|
||||
"X-Generator: Weblate 5.6.2\n"
|
||||
|
||||
#. module: announcement
|
||||
#: model_terms:ir.ui.view,arch_db:announcement.announcement_management_view_form
|
||||
@ -262,7 +262,7 @@ msgstr "Data inizio notifica"
|
||||
#. module: announcement
|
||||
#: model:ir.model.fields,field_description:announcement.field_announcement_tag__parent_id
|
||||
msgid "Parent Tag"
|
||||
msgstr "Etichetta adre"
|
||||
msgstr "Etichetta padre"
|
||||
|
||||
#. module: announcement
|
||||
#: model:ir.model.fields.selection,name:announcement.selection__read_announcement_wizard__read_state__read
|
||||
|
@ -7,7 +7,7 @@ Technical features group
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:b1f95f15bf88e671bb7843b72fce85702596559dd2c986cdfb15b0219745b85f
|
||||
!! source digest: sha256:3570fc5d77fc54c4e2464d9644657778bbf0077fbe794207e6fa7b81bbbcf21f
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png
|
||||
|
@ -3,7 +3,7 @@
|
||||
{
|
||||
"name": "Technical features group",
|
||||
"summary": "Access to technical features without activating debug mode",
|
||||
"version": "3.0.1.0.0",
|
||||
"version": "3.0.1.0.1",
|
||||
"category": "Usability",
|
||||
"website": "https://gitlab.com/flectra-community/server-ux",
|
||||
"author": "Opener B.V., Odoo Community Association (OCA)",
|
||||
|
@ -1,4 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
||||
<head>
|
||||
@ -9,10 +8,11 @@
|
||||
|
||||
/*
|
||||
:Author: David Goodger (goodger@python.org)
|
||||
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
|
||||
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
Despite the name, some widely supported CSS2 features are used.
|
||||
|
||||
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
@ -275,7 +275,7 @@ pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em }
|
||||
|
||||
pre.code .ln { color: grey; } /* line numbers */
|
||||
pre.code .ln { color: gray; } /* line numbers */
|
||||
pre.code, code { background-color: #eeeeee }
|
||||
pre.code .comment, code .comment { color: #5C6576 }
|
||||
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
||||
@ -301,7 +301,7 @@ span.option {
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic {
|
||||
span.problematic, pre.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
@ -367,7 +367,7 @@ ul.auto-toc {
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:b1f95f15bf88e671bb7843b72fce85702596559dd2c986cdfb15b0219745b85f
|
||||
!! source digest: sha256:3570fc5d77fc54c4e2464d9644657778bbf0077fbe794207e6fa7b81bbbcf21f
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Beta" src="https://img.shields.io/badge/maturity-Beta-yellow.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-ux/tree/17.0/base_technical_features"><img alt="OCA/server-ux" src="https://img.shields.io/badge/github-OCA%2Fserver--ux-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/server-ux-17-0/server-ux-17-0-base_technical_features"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/server-ux&target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||
<div class="section" id="access-to-technical-features-without-activating-debug-mode">
|
||||
@ -428,7 +428,9 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
||||
<div class="section" id="maintainers">
|
||||
<h1>Maintainers</h1>
|
||||
<p>This module is maintained by the OCA.</p>
|
||||
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
|
||||
<a class="reference external image-reference" href="https://odoo-community.org">
|
||||
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
|
||||
</a>
|
||||
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||
mission is to support the collaborative development of Odoo features and
|
||||
promote its widespread use.</p>
|
||||
|
@ -5,6 +5,7 @@ Most of the files are
|
||||
<!-- Copyright 2024 Moduon Team (https://www.moduon.team)
|
||||
Copyright 2017 ForgeFlow S.L. (https://www.forgeflow.com)
|
||||
Copyright 2017-19 ForgeFlow S.L. (https://www.forgeflow.com)
|
||||
Copyright 2017-24 ForgeFlow S.L. (https://www.forgeflow.com)
|
||||
Copyright 2018-19 ForgeFlow S.L. (https://www.forgeflow.com)
|
||||
Copyright 2019 Ecosoft Co., Ltd. (http://ecosoft.co.th)
|
||||
Copyright 2019 ForgeFlow S.L. (https://www.forgeflow.com)
|
||||
|
@ -7,7 +7,7 @@ Base Tier Validation
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:e78157d81ee550ef47e5520ef00a14fb058f92df85cfe32b5c96ced4df9c697d
|
||||
!! source digest: sha256:1d286dc389232f0cc60fd6012ae72c5eaf918284c9e7ef73da914cd6691cf822
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
.. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png
|
||||
@ -44,6 +44,12 @@ See
|
||||
`purchase_tier_validation <https://github.com/OCA/purchase-workflow>`__
|
||||
as an example of implementation.
|
||||
|
||||
Additionally, if your state field is a (stored) computed field, you need
|
||||
to set ``_tier_validation_state_field_is_computed`` to ``True`` in your
|
||||
model Python file, and you will want to add the dependent fields of the
|
||||
compute method in ``_get_after_validation_exceptions`` and
|
||||
``_get_under_validation_exceptions``.
|
||||
|
||||
**Table of contents**
|
||||
|
||||
.. contents::
|
||||
@ -241,7 +247,6 @@ Credits
|
||||
Authors
|
||||
-------
|
||||
|
||||
* brain-tec AG
|
||||
* ForgeFlow
|
||||
|
||||
Contributors
|
||||
@ -264,6 +269,8 @@ Contributors
|
||||
|
||||
- Houzéfa Abbasbhay
|
||||
|
||||
- Stefan Rijnhart <stefan@opener.amsterdam>
|
||||
|
||||
Maintainers
|
||||
-----------
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
# Copyright 2017-19 ForgeFlow S.L. (https://www.forgeflow.com)
|
||||
# Copyright 2017-24 ForgeFlow S.L. (https://www.forgeflow.com)
|
||||
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).
|
||||
{
|
||||
"name": "Base Tier Validation",
|
||||
"summary": "Implement a validation process based on tiers.",
|
||||
"version": "3.0.2.1.3",
|
||||
"version": "3.0.2.2.1",
|
||||
"development_status": "Mature",
|
||||
"maintainers": ["LoisRForgeFlow"],
|
||||
"category": "Tools",
|
||||
"website": "https://gitlab.com/flectra-community/server-ux",
|
||||
"author": "brain-tec AG, ForgeFlow, Odoo Community Association (OCA)",
|
||||
"author": "ForgeFlow, Odoo Community Association (OCA)",
|
||||
"license": "AGPL-3",
|
||||
"application": False,
|
||||
"installable": True,
|
||||
|
@ -5,6 +5,7 @@
|
||||
from ast import literal_eval
|
||||
|
||||
from lxml import etree
|
||||
from psycopg2.extensions import AsIs
|
||||
|
||||
from flectra import _, api, fields, models
|
||||
from flectra.exceptions import ValidationError
|
||||
@ -19,6 +20,7 @@ class TierValidation(models.AbstractModel):
|
||||
|
||||
_tier_validation_buttons_xpath = "/form/header/button[last()]"
|
||||
_tier_validation_manual_config = True
|
||||
_tier_validation_state_field_is_computed = False
|
||||
|
||||
_state_field = "state"
|
||||
_state_from = ["draft"]
|
||||
@ -340,6 +342,39 @@ class TierValidation(models.AbstractModel):
|
||||
return allowed_field_names, not_allowed_field_names
|
||||
|
||||
def write(self, vals):
|
||||
self._tier_validation_check_state_on_write(vals)
|
||||
self._tier_validation_check_write_allowed(vals)
|
||||
self._tier_validation_check_write_remove_reviews(vals)
|
||||
return super().write(vals)
|
||||
|
||||
def _write(self, vals):
|
||||
if self._tier_validation_state_field_is_computed:
|
||||
self._tier_validation_check_state_on_write(vals)
|
||||
self._tier_validation_check_write_remove_reviews(vals)
|
||||
return super()._write(vals)
|
||||
|
||||
def _tier_validation_get_current_state_value(self):
|
||||
"""Get the current value from the cache or the database.
|
||||
|
||||
If the field is set in a computed method, the value in the cache will
|
||||
already be the updated value, so we need to revert to the raw data.
|
||||
"""
|
||||
self.ensure_one()
|
||||
if self._tier_validation_state_field_is_computed and isinstance(self.id, int):
|
||||
self.env.cr.execute(
|
||||
"select %(field)s from %(table)s where id = %(res_id)s",
|
||||
{
|
||||
"field": AsIs(self._state_field),
|
||||
"table": AsIs(self._table),
|
||||
"res_id": self.id,
|
||||
},
|
||||
)
|
||||
rows = self.env.cr.fetchall()
|
||||
if rows:
|
||||
return rows[0][0]
|
||||
return self[self._state_field]
|
||||
|
||||
def _tier_validation_check_state_on_write(self, vals):
|
||||
for rec in self:
|
||||
if rec._check_state_conditions(vals):
|
||||
if rec.need_validation:
|
||||
@ -360,6 +395,9 @@ class TierValidation(models.AbstractModel):
|
||||
"one record."
|
||||
)
|
||||
)
|
||||
|
||||
def _tier_validation_check_write_allowed(self, vals):
|
||||
for rec in self:
|
||||
# Write under validation
|
||||
if (
|
||||
rec.review_ids
|
||||
@ -391,7 +429,7 @@ class TierValidation(models.AbstractModel):
|
||||
if (
|
||||
rec._get_validation_exceptions(add_base_exceptions=False)
|
||||
and rec.validation_status == "validated"
|
||||
and getattr(rec, self._state_field)
|
||||
and rec._tier_validation_get_current_state_value()
|
||||
in (self._state_to + [self._cancel_state])
|
||||
and not rec._check_allow_write_after_validation(vals)
|
||||
and not rec._context.get("skip_validation_check")
|
||||
@ -413,9 +451,11 @@ class TierValidation(models.AbstractModel):
|
||||
"allowed_fields": "\n- ".join(allowed_fields),
|
||||
}
|
||||
)
|
||||
|
||||
def _tier_validation_check_write_remove_reviews(self, vals):
|
||||
for rec in self:
|
||||
if rec._allow_to_remove_reviews(vals):
|
||||
rec.mapped("review_ids").unlink()
|
||||
return super().write(vals)
|
||||
|
||||
def _allow_to_remove_reviews(self, values):
|
||||
"""Method for deciding whether the elimination of revisions is necessary."""
|
||||
@ -423,7 +463,7 @@ class TierValidation(models.AbstractModel):
|
||||
state_to = values.get(self._state_field)
|
||||
if not state_to:
|
||||
return False
|
||||
state_from = self[self._state_field]
|
||||
state_from = self._tier_validation_get_current_state_value()
|
||||
# If you change to _cancel_state
|
||||
if state_to in (self._cancel_state):
|
||||
return True
|
||||
@ -435,7 +475,7 @@ class TierValidation(models.AbstractModel):
|
||||
def _check_state_from_condition(self):
|
||||
return self.env.context.get("skip_check_state_condition") or (
|
||||
self._state_field in self._fields
|
||||
and getattr(self, self._state_field) in self._state_from
|
||||
and self._tier_validation_get_current_state_value() in self._state_from
|
||||
)
|
||||
|
||||
def _check_state_conditions(self, vals):
|
||||
|
@ -367,7 +367,7 @@ ul.auto-toc {
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:e78157d81ee550ef47e5520ef00a14fb058f92df85cfe32b5c96ced4df9c697d
|
||||
!! source digest: sha256:1d286dc389232f0cc60fd6012ae72c5eaf918284c9e7ef73da914cd6691cf822
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Mature" src="https://img.shields.io/badge/maturity-Mature-brightgreen.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/agpl-3.0-standalone.html"><img alt="License: AGPL-3" src="https://img.shields.io/badge/licence-AGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-ux/tree/17.0/base_tier_validation"><img alt="OCA/server-ux" src="https://img.shields.io/badge/github-OCA%2Fserver--ux-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/server-ux-17-0/server-ux-17-0-base_tier_validation"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/server-ux&target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||
<p>Validating some operations is a common need across different areas in a
|
||||
@ -382,6 +382,11 @@ some development.</p>
|
||||
<p>See
|
||||
<a class="reference external" href="https://github.com/OCA/purchase-workflow">purchase_tier_validation</a>
|
||||
as an example of implementation.</p>
|
||||
<p>Additionally, if your state field is a (stored) computed field, you need
|
||||
to set <tt class="docutils literal">_tier_validation_state_field_is_computed</tt> to <tt class="docutils literal">True</tt> in your
|
||||
model Python file, and you will want to add the dependent fields of the
|
||||
compute method in <tt class="docutils literal">_get_after_validation_exceptions</tt> and
|
||||
<tt class="docutils literal">_get_under_validation_exceptions</tt>.</p>
|
||||
<p><strong>Table of contents</strong></p>
|
||||
<div class="contents local topic" id="contents">
|
||||
<ul class="simple">
|
||||
@ -594,7 +599,6 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
||||
<div class="section" id="authors">
|
||||
<h2><a class="toc-backref" href="#toc-entry-21">Authors</a></h2>
|
||||
<ul class="simple">
|
||||
<li>brain-tec AG</li>
|
||||
<li>ForgeFlow</li>
|
||||
</ul>
|
||||
</div>
|
||||
@ -618,6 +622,7 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
||||
<li>Houzéfa Abbasbhay</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Stefan Rijnhart <<a class="reference external" href="mailto:stefan@opener.amsterdam">stefan@opener.amsterdam</a>></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="maintainers">
|
||||
|
@ -19,14 +19,21 @@ class CommonTierValidation(common.TransactionCase):
|
||||
TierDefinition,
|
||||
TierValidationTester,
|
||||
TierValidationTester2,
|
||||
TierValidationTesterComputed,
|
||||
)
|
||||
|
||||
cls.loader.update_registry(
|
||||
(TierValidationTester, TierValidationTester2, TierDefinition)
|
||||
(
|
||||
TierValidationTester,
|
||||
TierValidationTester2,
|
||||
TierValidationTesterComputed,
|
||||
TierDefinition,
|
||||
)
|
||||
)
|
||||
|
||||
cls.test_model = cls.env[TierValidationTester._name]
|
||||
cls.test_model_2 = cls.env[TierValidationTester2._name]
|
||||
cls.test_model_computed = cls.env[TierValidationTesterComputed._name]
|
||||
|
||||
cls.tester_model = cls.env["ir.model"].search(
|
||||
[("model", "=", "tier.validation.tester")]
|
||||
@ -34,34 +41,32 @@ class CommonTierValidation(common.TransactionCase):
|
||||
cls.tester_model_2 = cls.env["ir.model"].search(
|
||||
[("model", "=", "tier.validation.tester2")]
|
||||
)
|
||||
|
||||
# Access record:
|
||||
cls.env["ir.model.access"].create(
|
||||
{
|
||||
"name": "access.tester",
|
||||
"model_id": cls.tester_model.id,
|
||||
"perm_read": 1,
|
||||
"perm_write": 1,
|
||||
"perm_create": 1,
|
||||
"perm_unlink": 1,
|
||||
}
|
||||
)
|
||||
cls.env["ir.model.access"].create(
|
||||
{
|
||||
"name": "access.tester2",
|
||||
"model_id": cls.tester_model_2.id,
|
||||
"perm_read": 1,
|
||||
"perm_write": 1,
|
||||
"perm_create": 1,
|
||||
"perm_unlink": 1,
|
||||
}
|
||||
cls.tester_model_computed = cls.env["ir.model"].search(
|
||||
[("model", "=", "tier.validation.tester.computed")]
|
||||
)
|
||||
|
||||
# Define views to avoid automatic views with all fields.
|
||||
for model in cls.test_model._name, cls.test_model_2._name:
|
||||
models = (
|
||||
cls.tester_model,
|
||||
cls.tester_model_2,
|
||||
cls.tester_model_computed,
|
||||
)
|
||||
for model in models:
|
||||
# Access record:
|
||||
cls.env["ir.model.access"].create(
|
||||
{
|
||||
"name": f"access {model.name}",
|
||||
"model_id": model.id,
|
||||
"perm_read": 1,
|
||||
"perm_write": 1,
|
||||
"perm_create": 1,
|
||||
"perm_unlink": 1,
|
||||
}
|
||||
)
|
||||
|
||||
# Define views to avoid automatic views with all fields.
|
||||
cls.env["ir.ui.view"].create(
|
||||
{
|
||||
"model": model,
|
||||
"model": model.model,
|
||||
"name": f"Demo view for {model}",
|
||||
"arch": """<form>
|
||||
<header>
|
||||
@ -103,6 +108,7 @@ class CommonTierValidation(common.TransactionCase):
|
||||
|
||||
cls.test_record = cls.test_model.create({"test_field": 1.0})
|
||||
cls.test_record_2 = cls.test_model_2.create({"test_field": 1.0})
|
||||
cls.test_record_computed = cls.test_model_computed.create({"test_field": 1.0})
|
||||
|
||||
cls.tier_def_obj.create(
|
||||
{
|
||||
@ -142,6 +148,19 @@ class CommonTierValidation(common.TransactionCase):
|
||||
}
|
||||
)
|
||||
|
||||
cls.tier_def_obj.create(
|
||||
{
|
||||
"model_id": cls.tester_model_computed.id,
|
||||
"review_type": "individual",
|
||||
"reviewer_id": cls.test_user_1.id,
|
||||
"definition_domain": "[]",
|
||||
"approve_sequence": True,
|
||||
"notify_on_pending": False,
|
||||
"sequence": 20,
|
||||
"name": "Definition for computed model",
|
||||
}
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
cls.loader.restore_registry()
|
||||
|
@ -970,6 +970,35 @@ class TierTierValidation(CommonTierValidation):
|
||||
)
|
||||
self.assertEqual(self.test_record.test_validation_field, 4)
|
||||
|
||||
def test_26_computed_state_field(self):
|
||||
"""Test the regular flow on a model where state is a computed field"""
|
||||
# The record cannot be confirmed without validation
|
||||
with self.assertRaisesRegex(
|
||||
ValidationError,
|
||||
"This action needs to be validated",
|
||||
):
|
||||
with self.env.cr.savepoint():
|
||||
self.test_record_computed.action_confirm()
|
||||
# Flush manually to trigger the _write
|
||||
self.test_record_computed.flush_recordset()
|
||||
self.assertEqual(self.test_record_computed.state, "draft")
|
||||
# The validation is performed
|
||||
self.test_record_computed.request_validation()
|
||||
self.test_record_computed.invalidate_recordset()
|
||||
self.assertEqual(self.test_record_computed.review_ids.status, "waiting")
|
||||
self.test_record_computed.with_user(self.test_user_1).validate_tier()
|
||||
self.test_record_computed.invalidate_recordset()
|
||||
self.assertEqual(self.test_record_computed.review_ids.status, "approved")
|
||||
# After validation, the record can be confirmed
|
||||
self.test_record_computed.action_confirm()
|
||||
self.test_record_computed.flush_recordset()
|
||||
self.assertEqual(self.test_record_computed.state, "confirmed")
|
||||
# After cancelling, the reviews are removed
|
||||
self.test_record_computed.action_cancel()
|
||||
self.test_record_computed.flush_recordset()
|
||||
self.assertFalse(self.test_record_computed.review_ids)
|
||||
self.test_record_computed.invalidate_recordset()
|
||||
|
||||
|
||||
@tagged("at_install")
|
||||
class TierTierValidationView(CommonTierValidation):
|
||||
|
@ -48,6 +48,59 @@ class TierValidationTester2(models.Model):
|
||||
self.write({"state": "confirmed"})
|
||||
|
||||
|
||||
class TierValidationTesterComputed(models.Model):
|
||||
_name = "tier.validation.tester.computed"
|
||||
_description = "Tier Validation Tester Computed"
|
||||
_inherit = ["tier.validation"]
|
||||
_tier_validation_manual_config = False
|
||||
_tier_validation_state_field_is_computed = True
|
||||
|
||||
confirmed = fields.Boolean()
|
||||
cancelled = fields.Boolean()
|
||||
state = fields.Selection(
|
||||
selection=[
|
||||
("draft", "Draft"),
|
||||
("confirmed", "Confirmed"),
|
||||
("cancel", "Cancel"),
|
||||
],
|
||||
compute="_compute_state",
|
||||
store=True,
|
||||
)
|
||||
test_field = fields.Float()
|
||||
test_validation_field = fields.Float()
|
||||
user_id = fields.Many2one(string="Assigned to:", comodel_name="res.users")
|
||||
|
||||
@api.model
|
||||
def _get_after_validation_exceptions(self):
|
||||
return super()._get_after_validation_exceptions() + [
|
||||
"confirmed",
|
||||
"cancelled",
|
||||
]
|
||||
|
||||
@api.model
|
||||
def _get_under_validation_exceptions(self):
|
||||
return super()._get_under_validation_exceptions() + [
|
||||
"confirmed",
|
||||
"cancelled",
|
||||
]
|
||||
|
||||
@api.depends("confirmed", "cancelled")
|
||||
def _compute_state(self):
|
||||
for rec in self:
|
||||
if rec.cancelled:
|
||||
rec.state = "cancel"
|
||||
elif rec.confirmed:
|
||||
rec.state = "confirmed"
|
||||
else:
|
||||
rec.state = "draft"
|
||||
|
||||
def action_confirm(self):
|
||||
self.write({"confirmed": True})
|
||||
|
||||
def action_cancel(self):
|
||||
self.write({"cancelled": True})
|
||||
|
||||
|
||||
class TierDefinition(models.Model):
|
||||
_inherit = "tier.definition"
|
||||
|
||||
@ -56,4 +109,5 @@ class TierDefinition(models.Model):
|
||||
res = super()._get_tier_validation_model_names()
|
||||
res.append("tier.validation.tester")
|
||||
res.append("tier.validation.tester2")
|
||||
res.append("tier.validation.tester.computed")
|
||||
return res
|
||||
|
@ -7,7 +7,7 @@ Date Range
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:bef360f14e07013cc293245f850d87fd6cfd11edbb6f8384310c65afc5f86b0a
|
||||
!! source digest: sha256:adcc800f01bc1399a9e196d4c4ed89ddb1287e99ee0e66d667dc47a6ff09a4db
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
|
||||
.. |badge1| image:: https://img.shields.io/badge/maturity-Mature-brightgreen.png
|
||||
|
@ -3,7 +3,7 @@
|
||||
{
|
||||
"name": "Date Range",
|
||||
"summary": "Manage all kind of date range",
|
||||
"version": "3.0.1.2.0",
|
||||
"version": "3.0.1.2.1",
|
||||
"category": "Uncategorized",
|
||||
"website": "https://gitlab.com/flectra-community/server-ux",
|
||||
"author": "ACSONE SA/NV, Odoo Community Association (OCA)",
|
||||
|
@ -9,35 +9,36 @@ msgstr ""
|
||||
"Project-Id-Version: Odoo Server 11.0\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2017-08-01 02:44+0000\n"
|
||||
"PO-Revision-Date: 2017-08-01 02:44+0000\n"
|
||||
"Last-Translator: OCA Transbot <transbot@odoo-community.org>, 2016\n"
|
||||
"Language-Team: Spanish (Argentina) (https://www.transifex.com/oca/"
|
||||
"teams/23907/es_AR/)\n"
|
||||
"PO-Revision-Date: 2024-10-07 00:06+0000\n"
|
||||
"Last-Translator: Ignacio Buioli <ibuioli@gmail.com>\n"
|
||||
"Language-Team: Spanish (Argentina) (https://www.transifex.com/oca/teams/"
|
||||
"23907/es_AR/)\n"
|
||||
"Language: es_AR\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: \n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"Plural-Forms: nplurals=2; plural=n != 1;\n"
|
||||
"X-Generator: Weblate 5.6.2\n"
|
||||
|
||||
#. module: date_range
|
||||
#. odoo-python
|
||||
#: code:addons/date_range/models/date_range.py:0
|
||||
#, python-format
|
||||
msgid "%(name)s is not a valid range (%(date_start)s > %(date_end)s)"
|
||||
msgstr ""
|
||||
msgstr "%(name)s no es un rango válido (%(date_start)s > %(date_end)s)"
|
||||
|
||||
#. module: date_range
|
||||
#. odoo-python
|
||||
#: code:addons/date_range/models/date_range.py:0
|
||||
#, python-format
|
||||
msgid "%(thisname)s overlaps %(dtname)s"
|
||||
msgstr ""
|
||||
msgstr "%(thisname)s sobrescribe %(dtname)s"
|
||||
|
||||
#. module: date_range
|
||||
#: model_terms:ir.ui.view,arch_db:date_range.date_range_generator_view_form
|
||||
#: model_terms:ir.ui.view,arch_db:date_range.view_date_range_type_form_view
|
||||
msgid "&nbsp;"
|
||||
msgstr ""
|
||||
msgstr "&nbsp;"
|
||||
|
||||
#. module: date_range
|
||||
#: model_terms:ir.ui.view,arch_db:date_range.date_range_generator_view_form
|
||||
@ -45,59 +46,61 @@ msgid ""
|
||||
",\n"
|
||||
" or generate"
|
||||
msgstr ""
|
||||
",\n"
|
||||
" o generar"
|
||||
|
||||
#. module: date_range
|
||||
#: model:ir.model.constraint,message:date_range.constraint_date_range_date_range_uniq
|
||||
msgid "A date range must be unique per company !"
|
||||
msgstr ""
|
||||
msgstr "¡El rango de fecha debe ser único por compañía!"
|
||||
|
||||
#. module: date_range
|
||||
#: model:ir.model.constraint,message:date_range.constraint_date_range_type_date_range_type_uniq
|
||||
msgid "A date range type must be unique per company !"
|
||||
msgstr ""
|
||||
msgstr "¡El tipo de rango de fecha debe ser único por compañía!"
|
||||
|
||||
#. module: date_range
|
||||
#: model:ir.model.fields,field_description:date_range.field_date_range__active
|
||||
#: model:ir.model.fields,field_description:date_range.field_date_range_type__active
|
||||
msgid "Active"
|
||||
msgstr ""
|
||||
msgstr "Activo"
|
||||
|
||||
#. module: date_range
|
||||
#: model:ir.model.fields,field_description:date_range.field_date_range_type__allow_overlap
|
||||
msgid "Allow Overlap"
|
||||
msgstr ""
|
||||
msgstr "Permitir Sobrescritura"
|
||||
|
||||
#. module: date_range
|
||||
#: model_terms:ir.ui.view,arch_db:date_range.view_date_range_form_view
|
||||
#: model_terms:ir.ui.view,arch_db:date_range.view_date_range_search
|
||||
#: model_terms:ir.ui.view,arch_db:date_range.view_date_range_type_search
|
||||
msgid "Archived"
|
||||
msgstr ""
|
||||
msgstr "Archivado"
|
||||
|
||||
#. module: date_range
|
||||
#: model:ir.actions.server,name:date_range.ir_cron_autocreate_ir_actions_server
|
||||
msgid "Auto-generate date ranges"
|
||||
msgstr ""
|
||||
msgstr "Autogenerar rangos de fecha"
|
||||
|
||||
#. module: date_range
|
||||
#: model_terms:ir.ui.view,arch_db:date_range.view_date_range_type_form_view
|
||||
msgid "Auto-generation settings"
|
||||
msgstr ""
|
||||
msgstr "Autogeneración de ajustes"
|
||||
|
||||
#. module: date_range
|
||||
#: model:ir.model.fields,field_description:date_range.field_date_range_type__autogeneration_count
|
||||
msgid "Autogeneration Count"
|
||||
msgstr ""
|
||||
msgstr "Cuenta de Autogeneración"
|
||||
|
||||
#. module: date_range
|
||||
#: model:ir.model.fields,field_description:date_range.field_date_range_type__autogeneration_date_start
|
||||
msgid "Autogeneration Start Date"
|
||||
msgstr ""
|
||||
msgstr "Autogeneración de Fecha de Inicio"
|
||||
|
||||
#. module: date_range
|
||||
#: model:ir.model.fields,field_description:date_range.field_date_range_type__autogeneration_unit
|
||||
msgid "Autogeneration Unit"
|
||||
msgstr ""
|
||||
msgstr "Autogeneración de Unidad"
|
||||
|
||||
#. module: date_range
|
||||
#: model_terms:ir.ui.view,arch_db:date_range.date_range_generator_view_form
|
||||
@ -110,17 +113,17 @@ msgstr "Cancelar"
|
||||
#: model:ir.model.fields,field_description:date_range.field_date_range_type__company_id
|
||||
#: model_terms:ir.ui.view,arch_db:date_range.view_date_range_search
|
||||
msgid "Company"
|
||||
msgstr ""
|
||||
msgstr "Compañía"
|
||||
|
||||
#. module: date_range
|
||||
#: model_terms:ir.ui.view,arch_db:date_range.view_date_range_type_form_view
|
||||
msgid "Configuration"
|
||||
msgstr ""
|
||||
msgstr "Configuración"
|
||||
|
||||
#. module: date_range
|
||||
#: model_terms:ir.ui.view,arch_db:date_range.view_date_range_type_form_view
|
||||
msgid "Create"
|
||||
msgstr ""
|
||||
msgstr "Crear"
|
||||
|
||||
#. module: date_range
|
||||
#: model:ir.model.fields,field_description:date_range.field_date_range__create_uid
|
||||
@ -139,45 +142,45 @@ msgstr "Creado en"
|
||||
#. module: date_range
|
||||
#: model:ir.model,name:date_range.model_date_range
|
||||
msgid "Date Range"
|
||||
msgstr ""
|
||||
msgstr "Rango de Fecha"
|
||||
|
||||
#. module: date_range
|
||||
#: model:ir.model,name:date_range.model_date_range_generator
|
||||
msgid "Date Range Generator"
|
||||
msgstr ""
|
||||
msgstr "Generador de Rango de Fecha"
|
||||
|
||||
#. module: date_range
|
||||
#: model:ir.model,name:date_range.model_date_range_type
|
||||
#: model_terms:ir.ui.view,arch_db:date_range.view_date_range_type_form_view
|
||||
msgid "Date Range Type"
|
||||
msgstr ""
|
||||
msgstr "Tipo de Rango de Fecha"
|
||||
|
||||
#. module: date_range
|
||||
#: model:ir.actions.act_window,name:date_range.date_range_type_action
|
||||
#: model:ir.ui.menu,name:date_range.menu_date_range_type_action
|
||||
msgid "Date Range Types"
|
||||
msgstr ""
|
||||
msgstr "Tipos de Rango de Fecha"
|
||||
|
||||
#. module: date_range
|
||||
#: model:ir.actions.act_window,name:date_range.date_range_action
|
||||
#: model:ir.ui.menu,name:date_range.menu_date_range_action
|
||||
msgid "Date Ranges"
|
||||
msgstr ""
|
||||
msgstr "Rangos de Fecha"
|
||||
|
||||
#. module: date_range
|
||||
#: model:ir.model.fields,field_description:date_range.field_date_range_type__date_ranges_exist
|
||||
msgid "Date Ranges Exist"
|
||||
msgstr ""
|
||||
msgstr "Rangos de Fecha Existen"
|
||||
|
||||
#. module: date_range
|
||||
#: model:ir.ui.menu,name:date_range.menu_date_range
|
||||
msgid "Date ranges"
|
||||
msgstr ""
|
||||
msgstr "Rangos de fecha"
|
||||
|
||||
#. module: date_range
|
||||
#: model_terms:ir.ui.view,arch_db:date_range.view_date_range_type_form_view
|
||||
msgid "Defaults for generating date ranges"
|
||||
msgstr ""
|
||||
msgstr "Valores predeterminados para generar rangos de fechas"
|
||||
|
||||
#. module: date_range
|
||||
#: model:ir.model.fields,field_description:date_range.field_date_range__display_name
|
||||
@ -190,18 +193,18 @@ msgstr "Mostrar Nombre"
|
||||
#: model:ir.model.fields,field_description:date_range.field_date_range_generator__duration_count
|
||||
#: model:ir.model.fields,field_description:date_range.field_date_range_type__duration_count
|
||||
msgid "Duration"
|
||||
msgstr ""
|
||||
msgstr "Duración"
|
||||
|
||||
#. module: date_range
|
||||
#: model_terms:ir.ui.view,arch_db:date_range.view_date_range_search
|
||||
msgid "End Date"
|
||||
msgstr ""
|
||||
msgstr "Fecha de Finalización"
|
||||
|
||||
#. module: date_range
|
||||
#: model:ir.model.fields,field_description:date_range.field_date_range__date_end
|
||||
#: model:ir.model.fields,field_description:date_range.field_date_range_generator__date_end
|
||||
msgid "End date"
|
||||
msgstr ""
|
||||
msgstr "Fecha de finalización"
|
||||
|
||||
#. module: date_range
|
||||
#: model:ir.model.fields,help:date_range.field_date_range_generator__name_expr
|
||||
@ -211,28 +214,31 @@ msgid ""
|
||||
"You can use the Date types 'date_end' and 'date_start', as well as the "
|
||||
"'index' variable."
|
||||
msgstr ""
|
||||
"Expresión evaluada. Por ejemplo, \"'FY%s' % date_start.strftime('%Y%m%d')\"\n"
|
||||
"Puede utilizar los tipos de fecha 'date_end' y 'date_start', así como la "
|
||||
"variable 'index'."
|
||||
|
||||
#. module: date_range
|
||||
#: model:ir.model.fields,field_description:date_range.field_date_range_search_mixin__date_range_search_id
|
||||
msgid "Filter by period (technical field)"
|
||||
msgstr ""
|
||||
msgstr "Filtrar por período (campo técnico)"
|
||||
|
||||
#. module: date_range
|
||||
#: model_terms:ir.ui.view,arch_db:date_range.date_range_generator_view_form
|
||||
msgid "Generate"
|
||||
msgstr ""
|
||||
msgstr "Generar"
|
||||
|
||||
#. module: date_range
|
||||
#: model:ir.actions.act_window,name:date_range.date_range_generator_action
|
||||
#: model:ir.ui.menu,name:date_range.menu_date_range_generator_action
|
||||
#: model_terms:ir.ui.view,arch_db:date_range.date_range_generator_view_form
|
||||
msgid "Generate Date Ranges"
|
||||
msgstr ""
|
||||
msgstr "Generar Rangos de Fecha"
|
||||
|
||||
#. module: date_range
|
||||
#: model_terms:ir.ui.view,arch_db:date_range.view_date_range_type_form_view
|
||||
msgid "Generation"
|
||||
msgstr ""
|
||||
msgstr "Generación"
|
||||
|
||||
#. module: date_range
|
||||
#: model:ir.model.fields,field_description:date_range.field_date_range__id
|
||||
@ -245,13 +251,15 @@ msgstr "ID"
|
||||
#: model:ir.model.fields,help:date_range.field_date_range_type__allow_overlap
|
||||
msgid "If set, date ranges of same type must not overlap."
|
||||
msgstr ""
|
||||
"Si está configurado, los rangos de fecha del mismo tipo no deben "
|
||||
"sobrescribirse."
|
||||
|
||||
#. module: date_range
|
||||
#. odoo-python
|
||||
#: code:addons/date_range/wizard/date_range_generator.py:0
|
||||
#, python-format
|
||||
msgid "Invalid name expression: %s"
|
||||
msgstr ""
|
||||
msgstr "Nombre de expresión inválido: %s"
|
||||
|
||||
#. module: date_range
|
||||
#: model:ir.model.fields,field_description:date_range.field_date_range__write_uid
|
||||
@ -271,6 +279,7 @@ msgstr "Última actualización el"
|
||||
#: model:ir.model,name:date_range.model_date_range_search_mixin
|
||||
msgid "Mixin class to add a Many2one style period search field"
|
||||
msgstr ""
|
||||
"Clase Mixin para agregar un campo de búsqueda de período de estilo Many2one"
|
||||
|
||||
#. module: date_range
|
||||
#: model:ir.model.fields,field_description:date_range.field_date_range__name
|
||||
@ -283,77 +292,77 @@ msgstr "Nombre"
|
||||
#: code:addons/date_range/wizard/date_range_generator.py:0
|
||||
#, python-format
|
||||
msgid "No ranges to generate with these settings"
|
||||
msgstr ""
|
||||
msgstr "No hay rangos a generar con estos ajustes"
|
||||
|
||||
#. module: date_range
|
||||
#: model:ir.model.fields,field_description:date_range.field_date_range_generator__count
|
||||
msgid "Number of ranges to generate"
|
||||
msgstr ""
|
||||
msgstr "Número de rangos a generar"
|
||||
|
||||
#. module: date_range
|
||||
#: model:ir.model.fields,help:date_range.field_date_range_type__autogeneration_date_start
|
||||
msgid "Only applies when there are no date ranges of this type yet"
|
||||
msgstr ""
|
||||
msgstr "Solo aplica cuando no hay rangos de fecha de este tipo aún"
|
||||
|
||||
#. module: date_range
|
||||
#: model_terms:ir.ui.view,arch_db:date_range.date_range_generator_view_form
|
||||
msgid "Parameters"
|
||||
msgstr ""
|
||||
msgstr "Parámetros"
|
||||
|
||||
#. module: date_range
|
||||
#. odoo-python
|
||||
#: code:addons/date_range/models/date_range_search_mixin.py:0
|
||||
#, python-format
|
||||
msgid "Period"
|
||||
msgstr ""
|
||||
msgstr "Período"
|
||||
|
||||
#. module: date_range
|
||||
#. odoo-python
|
||||
#: code:addons/date_range/wizard/date_range_generator.py:0
|
||||
#, python-format
|
||||
msgid "Please enter an end date, or the number of ranges to generate."
|
||||
msgstr ""
|
||||
msgstr "Ingrese una fecha de finalización, o el número de rangos a generar."
|
||||
|
||||
#. module: date_range
|
||||
#. odoo-python
|
||||
#: code:addons/date_range/wizard/date_range_generator.py:0
|
||||
#, python-format
|
||||
msgid "Please set a prefix or an expression to generate the range names."
|
||||
msgstr ""
|
||||
msgstr "Configure un prefijo o una expresión para generar el rango de nombres."
|
||||
|
||||
#. module: date_range
|
||||
#: model:ir.model.fields,field_description:date_range.field_date_range_generator__range_name_preview
|
||||
#: model:ir.model.fields,field_description:date_range.field_date_range_type__range_name_preview
|
||||
msgid "Range Name Preview"
|
||||
msgstr ""
|
||||
msgstr "Previsualizar Nombre del Rango"
|
||||
|
||||
#. module: date_range
|
||||
#: model:ir.model.fields,field_description:date_range.field_date_range_generator__name_expr
|
||||
#: model:ir.model.fields,field_description:date_range.field_date_range_type__name_expr
|
||||
msgid "Range name expression"
|
||||
msgstr ""
|
||||
msgstr "Expresión del rango del nombre"
|
||||
|
||||
#. module: date_range
|
||||
#: model:ir.model.fields,field_description:date_range.field_date_range_generator__name_prefix
|
||||
#: model:ir.model.fields,field_description:date_range.field_date_range_type__name_prefix
|
||||
msgid "Range name prefix"
|
||||
msgstr ""
|
||||
msgstr "Prefijo del rango del nombre"
|
||||
|
||||
#. module: date_range
|
||||
#: model:ir.model.fields,field_description:date_range.field_date_range_type__date_range_ids
|
||||
msgid "Ranges"
|
||||
msgstr ""
|
||||
msgstr "Rangos"
|
||||
|
||||
#. module: date_range
|
||||
#: model_terms:ir.ui.view,arch_db:date_range.view_date_range_search
|
||||
msgid "Start Date"
|
||||
msgstr ""
|
||||
msgstr "Fecha de Inicio"
|
||||
|
||||
#. module: date_range
|
||||
#: model:ir.model.fields,field_description:date_range.field_date_range__date_start
|
||||
#: model:ir.model.fields,field_description:date_range.field_date_range_generator__date_start
|
||||
msgid "Start date"
|
||||
msgstr ""
|
||||
msgstr "Fecha de inicio"
|
||||
|
||||
#. module: date_range
|
||||
#. odoo-python
|
||||
@ -363,17 +372,20 @@ msgid ""
|
||||
"The Company in the Date Range Generator and in Date Range Type must be the "
|
||||
"same."
|
||||
msgstr ""
|
||||
"La Compañía en el Generador de Rango de Fecha y en el Tipo del Rango de "
|
||||
"Fecha debe ser igual."
|
||||
|
||||
#. module: date_range
|
||||
#: model:ir.model.fields,help:date_range.field_date_range_type__active
|
||||
msgid ""
|
||||
"The active field allows you to hide the date range type without removing it."
|
||||
msgstr ""
|
||||
"El campo activo le permite esconder el tipo de rango de fecha sin eliminarlo."
|
||||
|
||||
#. module: date_range
|
||||
#: model:ir.model.fields,help:date_range.field_date_range__active
|
||||
msgid "The active field allows you to hide the date range without removing it."
|
||||
msgstr ""
|
||||
msgstr "El campo activo le permite ocultar el rango de fecha sin eliminarlo."
|
||||
|
||||
#. module: date_range
|
||||
#: model:ir.model.fields,field_description:date_range.field_date_range__type_id
|
||||
@ -385,12 +397,12 @@ msgstr "Tipo"
|
||||
#: model:ir.model.fields,field_description:date_range.field_date_range_generator__unit_of_time
|
||||
#: model:ir.model.fields,field_description:date_range.field_date_range_type__unit_of_time
|
||||
msgid "Unit Of Time"
|
||||
msgstr ""
|
||||
msgstr "Unidad de Tiempo"
|
||||
|
||||
#. module: date_range
|
||||
#: model_terms:ir.ui.view,arch_db:date_range.date_range_generator_view_form
|
||||
msgid "Until"
|
||||
msgstr ""
|
||||
msgstr "Hasta"
|
||||
|
||||
#. module: date_range
|
||||
#. odoo-python
|
||||
@ -400,50 +412,52 @@ msgid ""
|
||||
"You cannot change the company, as this Date Range Type is assigned to Date "
|
||||
"Range '%s'."
|
||||
msgstr ""
|
||||
"No puede cambiar la compañía, ya que este Tipo de Rango de Fechas está "
|
||||
"asignado al Rango de Fechas '%s'."
|
||||
|
||||
#. module: date_range
|
||||
#: model:ir.model.fields.selection,name:date_range.selection__date_range_generator__unit_of_time__3
|
||||
#: model:ir.model.fields.selection,name:date_range.selection__date_range_type__autogeneration_unit__3
|
||||
#: model:ir.model.fields.selection,name:date_range.selection__date_range_type__unit_of_time__3
|
||||
msgid "days"
|
||||
msgstr ""
|
||||
msgstr "días"
|
||||
|
||||
#. module: date_range
|
||||
#: model_terms:ir.ui.view,arch_db:date_range.date_range_generator_view_form
|
||||
msgid "entries."
|
||||
msgstr ""
|
||||
msgstr "entradas."
|
||||
|
||||
#. module: date_range
|
||||
#: model_terms:ir.ui.view,arch_db:date_range.view_date_range_type_form_view
|
||||
msgid "in advance"
|
||||
msgstr ""
|
||||
msgstr "por adelantado"
|
||||
|
||||
#. module: date_range
|
||||
#: model:ir.model.fields.selection,name:date_range.selection__date_range_generator__unit_of_time__1
|
||||
#: model:ir.model.fields.selection,name:date_range.selection__date_range_type__autogeneration_unit__1
|
||||
#: model:ir.model.fields.selection,name:date_range.selection__date_range_type__unit_of_time__1
|
||||
msgid "months"
|
||||
msgstr ""
|
||||
msgstr "meses"
|
||||
|
||||
#. module: date_range
|
||||
#: model_terms:ir.ui.view,arch_db:date_range.date_range_generator_view_form
|
||||
#: model_terms:ir.ui.view,arch_db:date_range.view_date_range_type_form_view
|
||||
msgid "or enter a complex expression below"
|
||||
msgstr ""
|
||||
msgstr "o ingrese una expresión compleja debajo"
|
||||
|
||||
#. module: date_range
|
||||
#: model:ir.model.fields.selection,name:date_range.selection__date_range_generator__unit_of_time__2
|
||||
#: model:ir.model.fields.selection,name:date_range.selection__date_range_type__autogeneration_unit__2
|
||||
#: model:ir.model.fields.selection,name:date_range.selection__date_range_type__unit_of_time__2
|
||||
msgid "weeks"
|
||||
msgstr ""
|
||||
msgstr "semanas"
|
||||
|
||||
#. module: date_range
|
||||
#: model:ir.model.fields.selection,name:date_range.selection__date_range_generator__unit_of_time__0
|
||||
#: model:ir.model.fields.selection,name:date_range.selection__date_range_type__autogeneration_unit__0
|
||||
#: model:ir.model.fields.selection,name:date_range.selection__date_range_type__unit_of_time__0
|
||||
msgid "years"
|
||||
msgstr ""
|
||||
msgstr "años"
|
||||
|
||||
#, fuzzy
|
||||
#~ msgid "Type Name"
|
||||
|
@ -8,10 +8,11 @@
|
||||
|
||||
/*
|
||||
:Author: David Goodger (goodger@python.org)
|
||||
:Id: $Id: html4css1.css 8954 2022-01-20 10:10:25Z milde $
|
||||
:Id: $Id: html4css1.css 9511 2024-01-13 09:50:07Z milde $
|
||||
:Copyright: This stylesheet has been placed in the public domain.
|
||||
|
||||
Default cascading style sheet for the HTML output of Docutils.
|
||||
Despite the name, some widely supported CSS2 features are used.
|
||||
|
||||
See https://docutils.sourceforge.io/docs/howto/html-stylesheets.html for how to
|
||||
customize this style sheet.
|
||||
@ -274,7 +275,7 @@ pre.literal-block, pre.doctest-block, pre.math, pre.code {
|
||||
margin-left: 2em ;
|
||||
margin-right: 2em }
|
||||
|
||||
pre.code .ln { color: grey; } /* line numbers */
|
||||
pre.code .ln { color: gray; } /* line numbers */
|
||||
pre.code, code { background-color: #eeeeee }
|
||||
pre.code .comment, code .comment { color: #5C6576 }
|
||||
pre.code .keyword, code .keyword { color: #3B0D06; font-weight: bold }
|
||||
@ -300,7 +301,7 @@ span.option {
|
||||
span.pre {
|
||||
white-space: pre }
|
||||
|
||||
span.problematic {
|
||||
span.problematic, pre.problematic {
|
||||
color: red }
|
||||
|
||||
span.section-subtitle {
|
||||
@ -366,7 +367,7 @@ ul.auto-toc {
|
||||
!! This file is generated by oca-gen-addon-readme !!
|
||||
!! changes will be overwritten. !!
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
!! source digest: sha256:bef360f14e07013cc293245f850d87fd6cfd11edbb6f8384310c65afc5f86b0a
|
||||
!! source digest: sha256:adcc800f01bc1399a9e196d4c4ed89ddb1287e99ee0e66d667dc47a6ff09a4db
|
||||
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
|
||||
<p><a class="reference external image-reference" href="https://odoo-community.org/page/development-status"><img alt="Mature" src="https://img.shields.io/badge/maturity-Mature-brightgreen.png" /></a> <a class="reference external image-reference" href="http://www.gnu.org/licenses/lgpl-3.0-standalone.html"><img alt="License: LGPL-3" src="https://img.shields.io/badge/licence-LGPL--3-blue.png" /></a> <a class="reference external image-reference" href="https://github.com/OCA/server-ux/tree/17.0/date_range"><img alt="OCA/server-ux" src="https://img.shields.io/badge/github-OCA%2Fserver--ux-lightgray.png?logo=github" /></a> <a class="reference external image-reference" href="https://translation.odoo-community.org/projects/server-ux-17-0/server-ux-17-0-date_range"><img alt="Translate me on Weblate" src="https://img.shields.io/badge/weblate-Translate%20me-F47D42.png" /></a> <a class="reference external image-reference" href="https://runboat.odoo-community.org/builds?repo=OCA/server-ux&target_branch=17.0"><img alt="Try me on Runboat" src="https://img.shields.io/badge/runboat-Try%20me-875A7B.png" /></a></p>
|
||||
<p>This module lets you define global date ranges that can be used to
|
||||
@ -483,7 +484,9 @@ If you spotted it first, help us to smash it by providing a detailed and welcome
|
||||
<div class="section" id="maintainers">
|
||||
<h2><a class="toc-backref" href="#toc-entry-8">Maintainers</a></h2>
|
||||
<p>This module is maintained by the OCA.</p>
|
||||
<a class="reference external image-reference" href="https://odoo-community.org"><img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" /></a>
|
||||
<a class="reference external image-reference" href="https://odoo-community.org">
|
||||
<img alt="Odoo Community Association" src="https://odoo-community.org/logo.png" />
|
||||
</a>
|
||||
<p>OCA, or the Odoo Community Association, is a nonprofit organization whose
|
||||
mission is to support the collaborative development of Odoo features and
|
||||
promote its widespread use.</p>
|
||||
|
@ -46,6 +46,11 @@ patch(TreeEditor.prototype, {
|
||||
) {
|
||||
info.component = Select;
|
||||
}
|
||||
// Prevent issues when the domain is not initialized, for example in
|
||||
// Flectra Studio editing
|
||||
if (!this.env.domain) {
|
||||
return info;
|
||||
}
|
||||
let dateRanges = this.env.domain.dateRanges;
|
||||
if (this.update_operator && this.update_operator.split("daterange_")[1]) {
|
||||
dateRanges = this.env.domain.dateRanges.filter(
|
||||
@ -105,6 +110,11 @@ patch(TreeEditor.prototype, {
|
||||
super.updateLeafOperator.apply(this, arguments);
|
||||
this.update_operator = operator;
|
||||
const fieldDef = this.getFieldDef(node.path);
|
||||
// Prevent issues when the domain is not initialized, for example in
|
||||
// Flectra Studio editing
|
||||
if (!this.env.domain) {
|
||||
return;
|
||||
}
|
||||
let dateRanges = this.env.domain.dateRanges.filter(
|
||||
(range) => range.type_id[0] === Number(operator.split("daterange_")[1])
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user