Skip to content

[6111][ADD] product_restricted_tracking#223

Open
SanamiK wants to merge 7 commits into
16.0from
6111-add-product_restricted_tracking
Open

[6111][ADD] product_restricted_tracking#223
SanamiK wants to merge 7 commits into
16.0from
6111-add-product_restricted_tracking

Conversation

@SanamiK
Copy link
Copy Markdown
Member

@SanamiK SanamiK commented Apr 16, 2026

6111

Translation

msgid msgstr 参照
Product プロダクト product_restricted_tracking/i18n/ja.po
Product Category プロダクトカテゴリ product_restricted_tracking/i18n/ja.po
By Lots ロット odoo/stock
By Unique Serial Number 固有のシリアル番号 odoo/stock
No Tracking 追跡なし odoo/stock
Restricted Tracking 追跡の制限 独自翻訳
\n... and %s more product(s) \n... さらに %s 件のプロダクト 独自翻訳
Cannot set restricted tracking to '%(tracking)s' because %(count)s product(s) in this category have different tracking:\n%(products)s%(more)s このカテゴリの %(count)s 件のプロダクトが異なる追跡を持っているため、追跡の制限を '%(tracking)s' に設定できません:\n%(products)s%(more)s 独自翻訳
Product '%(product)s' has tracking '%(tracking)s' but is assigned to category '%(category)s' which requires tracking '%(required_tracking)s'. プロダクト '%(product)s' は追跡 '%(tracking)s' を持っていますが、追跡 '%(required_tracking)s' が必要なカテゴリ '%(category)s' に割り当てられています。 独自翻訳

Copy link
Copy Markdown
Contributor

@nobuQuartile nobuQuartile left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines +11 to +24
categ_id_domain = fields.Binary(
string="Category Domain",
compute="_compute_categ_id_domain",
help="Dynamic domain used for filtering allowed categories based on tracking",
)

@api.depends("tracking")
def _compute_categ_id_domain(self):
for record in self:
record.categ_id_domain = [
"|",
("restricted_tracking", "=", False),
("restricted_tracking", "=", record.tracking),
]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my comment in the corresponding OCA PR.

Suggested change
categ_id_domain = fields.Binary(
string="Category Domain",
compute="_compute_categ_id_domain",
help="Dynamic domain used for filtering allowed categories based on tracking",
)
@api.depends("tracking")
def _compute_categ_id_domain(self):
for record in self:
record.categ_id_domain = [
"|",
("restricted_tracking", "=", False),
("restricted_tracking", "=", record.tracking),
]

Copy link
Copy Markdown
Member Author

@SanamiK SanamiK Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since that was the feature I had trouble with when testing so I feel it is a nice improvement.
I'll fix the issue later.

@SanamiK SanamiK closed this Apr 17, 2026
@nobuQuartile
Copy link
Copy Markdown
Contributor

@SanamiK
Why did you close this PR?

@AungKoKoLin1997
Copy link
Copy Markdown
Contributor

@SanamiK I don't know why you close but I updated in the OCA and you can apply the same in your PR.
You can take a chance to use reflectoca tool.
https://github.com/qrtl/qrtl-dev-tools/blob/master/README.md#oca-module-sync

@SanamiK
Copy link
Copy Markdown
Member Author

SanamiK commented Apr 17, 2026

@nobuQuartile Yes, I'll reopen it after fixing the issue.
@AungKoKoLin1997 Thank you! I'll refer to your PR.

@SanamiK SanamiK reopened this Apr 17, 2026
@SanamiK
Copy link
Copy Markdown
Member Author

SanamiK commented Apr 17, 2026

Done!

Comment thread product_restricted_tracking/views/product_views.xml Outdated
@SanamiK SanamiK force-pushed the 6111-add-product_restricted_tracking branch from f4a4acc to aaa998e Compare April 20, 2026 04:30
@SanamiK SanamiK force-pushed the 6111-add-product_restricted_tracking branch from aaa998e to 1ff58fb Compare April 20, 2026 04:47
@SanamiK
Copy link
Copy Markdown
Member Author

SanamiK commented Apr 20, 2026

@nobuQuartile I accidentally ended up combining multiple commits, but could you please review the current version?

Comment thread product_restricted_tracking/i18n/ja.po Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants