Skip to content

[FIX] website_sale_stock_hide_unavailable: settings of a company without website - #531

Closed
JrAdhoc wants to merge 1 commit into
ingadhoc:20.0from
adhoc-dev:20.0-h-133229-jr
Closed

JrAdhoc wants to merge 1 commit into
ingadhoc:20.0from
adhoc-dev:20.0-h-133229-jr

Conversation

@JrAdhoc

@JrAdhoc JrAdhoc commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Ticket: https://www.adhoc.inc/odoo/helpdesk.ticket/133229

Qué pasaba: en Ajustes > Sitio web, si la empresa activa no tiene sitio web, la opción «Productos sin stock» aparecía sin ninguna opción marcada y, por ser obligatoria, no dejaba guardar la página de Ajustes. Eso trababa también los ajustes de las otras apps.

Qué cambia:

  • La opción es obligatoria solo cuando hay sitio (required="website_id" en el campo, como hace Odoo con sus propios ajustes del sitio) y se oculta cuando no hay sitio.
  • El valor guardado en el sitio sigue siendo obligatorio y con valor por defecto en website, así que ningún sitio puede quedar vacío.
  • Versión del módulo a 20.0.1.0.1, para que el cambio de vista llegue a las bases existentes.

Validación:

  • Test nuevo test_settings_option_is_only_required_with_a_website: falla con el código de 20.0 y pasa con el arreglo (29 tests del módulo en verde, en local).
  • Probado en el navegador con una empresa sin sitio: la opción no aparece y los ajustes se guardan.

…out website

Settings take the website of the active company. When that company has no
website, the option came empty and, being required in Settings, the form
refused to save the whole page, the settings of other apps included.

The option is now required only when there is a website, with
required="website_id" on the field, as Odoo does with its own website
settings, and it is hidden when there is none, so it is not offered where the
choice would go nowhere. The website keeps its own required and default, so
no website can end up empty.
@roboadhoc

Copy link
Copy Markdown
Contributor

Pull request status dashboard

@augusto-weiss

Copy link
Copy Markdown
Contributor

@roboadhoc r+ nobump

@roboadhoc roboadhoc closed this in aaec2a4 Nov 18, 2026
@adhoc-mirror-sync
adhoc-mirror-sync Bot deleted the 20.0-h-133229-jr branch November 18, 2026 21:27
@roboadhoc roboadhoc added the 19.1 label Nov 18, 2026

This branch was previously deployed

1 inactive deployment
merge — 5f7adf9c Deployed Nov 18, 2026 by roboadhoc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants