Compare commits

...

2 commits

Author SHA1 Message Date
snt
3f822a28cf [FIX] mypy: Configure to ignore missing Odoo imports globally
- Set ignore_missing_imports = True at global [mypy] level
- Add explicit sections for odoo, odoo.*, and odoo.addons.*
- Fixes pre-commit hook failures when mypy checks Odoo addon files
- Resolves 'Cannot find implementation or library stub for module named odoo' errors

This is a known issue with Odoo stubs not being fully compatible with mypy.
2026-02-25 19:01:28 +01:00
snt
1779c42e9b [IMP] website_sale_aplicoop: Replace product_origin with product_origin_char
- Replace dependency from product_origin to product_origin_char
- Update product card template to show origin_text field instead of country_id/state_id
- Simpler and more flexible: free text origin per supplier instead of structured fields
- Version: 18.0.1.6.0 -> 18.0.1.7.0

The new field is more suitable for creative product origins like 'Valencia, Huerta de...'
or 'Región de Murcia, cooperativa XX' which don't fit the rigid country/state structure.
2026-02-25 18:55:33 +01:00
3 changed files with 11 additions and 19 deletions

View file

@ -5,8 +5,13 @@
exclude = .*/migrations/.* exclude = .*/migrations/.*
# Ignore missing imports from Odoo modules # Ignore missing imports from Odoo modules
[mypy-odoo.*]
ignore_missing_imports = True ignore_missing_imports = True
[mypy-odoo] [mypy-odoo]
ignore_missing_imports = True ignore_missing_imports = True
[mypy-odoo.*]
ignore_missing_imports = True
[mypy-odoo.addons.*]
ignore_missing_imports = True

View file

@ -3,7 +3,7 @@
{ # noqa: B018 { # noqa: B018
"name": "Website Sale - Aplicoop", "name": "Website Sale - Aplicoop",
"version": "18.0.1.6.0", "version": "18.0.1.7.0",
"category": "Website/Sale", "category": "Website/Sale",
"summary": "Modern replacement of legacy Aplicoop - Collaborative consumption group orders", "summary": "Modern replacement of legacy Aplicoop - Collaborative consumption group orders",
"author": "Odoo Community Association (OCA), Criptomart", "author": "Odoo Community Association (OCA), Criptomart",
@ -17,7 +17,7 @@
"stock", "stock",
"account", "account",
"product_get_price_helper", "product_get_price_helper",
"product_origin", "product_origin_char",
], ],
"data": [ "data": [
# Datos: Grupos propios # Datos: Grupos propios

View file

@ -1142,7 +1142,7 @@
</p> </p>
</t> </t>
<t <t
t-if="product.country_id or product.state_id" t-if="product.origin_text"
> >
<p <p
class="product-origin mb-2" class="product-origin mb-2"
@ -1153,21 +1153,8 @@
aria-hidden="true" aria-hidden="true"
/> />
<t <t
t-if="product.state_id" t-out="product.origin_text"
>
<t
t-out="product.state_id.name"
/><t
t-if="product.country_id"
>, </t>
</t>
<t
t-if="product.country_id"
>
<t
t-out="product.country_id.name"
/> />
</t>
</small> </small>
</p> </p>
</t> </t>