Skip to content

Commit 53becff

Browse files
committed
FIX Re-import product
1 parent 61d7548 commit 53becff

File tree

5 files changed

+211
-132
lines changed

5 files changed

+211
-132
lines changed

import_helper_generic/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
from . import models
12
from . import wizards
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from . import product_template
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright (c) 2026 Akretion.
2+
3+
from odoo import api, models, fields
4+
5+
6+
class ProductTemplate(models.Model):
7+
_inherit = "product.template"
8+
9+
default_code_import = fields.Char(
10+
"reference interne pour import",
11+
compute="_compute_default_code_import",
12+
store=True,
13+
)
14+
15+
@api.depends("default_code")
16+
def _compute_default_code_import(self):
17+
for record in self:
18+
if record.default_code:
19+
record.default_code_import = record.default_code

0 commit comments

Comments
 (0)