[FIX] cli: support export of pot files

The export_translation method supports the "new language" option but
it was not possible if giving a .pot file.

closes odoo/odoo#85141

X-original-commit: 93e23025252784f39f37a7ffd109425ae56b1d36
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
This commit is contained in:
Ronald Portier
2022-02-22 16:16:40 +00:00
parent b8176448c3
commit f278589d2a
+3
View File
@@ -99,6 +99,9 @@ def export_translation():
config["translate_out"])
fileformat = os.path.splitext(config["translate_out"])[-1][1:].lower()
# .pot is the same fileformat as .po
if fileformat == "pot":
fileformat = "po"
with open(config["translate_out"], "wb") as buf:
registry = odoo.modules.registry.Registry.new(dbname)