Hello, is there a way to update the products' country of origin from two-letters (US) to three (USA)? Thanks in advance, Balazs
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
- CRM
- e-Commerce
- Księgowość
- Zapasy
- PoS
- Project
- MRP
To pytanie dostało ostrzeżenie
Hi,
If you want to use three-letter codes (e.g. USA, IND, FRA), you can extend the model in a custom module and simply update the size constraint to 3:
from odoo import models, fields
class ResCountry(models.Model):
_inherit = "res.country"
code = fields.Char(
string='Country Code',
size=3,
required=True,
help='The ISO country code in three chars. \nYou can use this field for quick search.'
)
You can change size=2 to size=3 by inheriting res.country in a custom module. But keep in mind that Odoo and external services assume the 2-letter ISO format, so it’s recommended to add a separate code_alpha3 field for 3-letter codes instead of overriding the default one.
Hope it helps
Podoba Ci się ta dyskusja? Dołącz do niej!
Stwórz konto dzisiaj, aby cieszyć się ekskluzywnymi funkcjami i wchodzić w interakcje z naszą wspaniałą społecznością!
Zarejestruj sięPowiązane posty | Odpowiedzi | Widoki | Czynność | |
---|---|---|---|---|
|
2
wrz 25
|
534 | ||
|
1
paź 25
|
667 | ||
|
2
cze 25
|
2193 | ||
|
0
mar 25
|
2077 | ||
|
0
lut 25
|
1568 |