[16.0][IMP] lighting: free-text spare parts field on lighting.product#100
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 16.0 #100 +/- ##
==========================================
+ Coverage 43.51% 43.91% +0.40%
==========================================
Files 283 285 +2
Lines 8159 8149 -10
Branches 1580 1566 -14
==========================================
+ Hits 3550 3579 +29
+ Misses 4513 4475 -38
+ Partials 96 95 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
90b7aae to
4e9146a
Compare
…ated-products filter" This reverts commit 126c9bc. Companion to the same-PR is_component revert in the lighting module: the is_component field no longer exists, so the reference here must go too. Otherwise the datasheet PDF render raises AttributeError. Manifest re-bumped from the auto-revert 16.0.1.0.0 to 16.0.1.3.0 so the upgrade stays monotonic on top of the currently deployed 16.0.1.2.0.
…ducts filter" This reverts commit 3c96b0e. Companion to the same-PR is_component revert in the lighting module: the is_component field no longer exists, so the reference here must go too. Otherwise the PDF report render raises AttributeError. README.rst + static/description/index.html regenerated from fragments by the pre-commit hook to match the restored manifest state. Manifest re-bumped from the auto-revert 16.0.1.0.0 to 16.0.1.3.0 so the upgrade stays monotonic on top of the currently deployed 16.0.1.2.0.
…onents as superset of spare parts)" This reverts commit 16787d5.
This reverts commit 7b2c180.
This reverts commit 3ff01f2.
Adds a new One2many `sparepart_ids` on `lighting.product` backed by the
new model `lighting.product.sparepart` (sequence/name/description) and
exposes it inside a new Spare parts tab on the product form. The use
case is a manual reference list maintained by the After Sales team
without coupling to SAP product codes.
Files:
* lighting/models/product_sparepart.py — new model (3 fields + a
cascade-delete back-reference to lighting.product).
* lighting/models/product.py — adds the One2many field.
* lighting/security/ir.model.access.csv — guest/user/manager ACLs
on the new model, matching the existing pattern for sub-models of
lighting.product.
* lighting/views/product_views.xml — new Spare parts tab with an
inline editable_tree of sequence/name/description.
Translations: es.po / fr.po / pt.po extended; ca.po created (was
missing — mandatory per NuoBiT) with the new msgids only.
Tests: lighting/tests/test_product_sparepart.py covers persistence,
sequence ordering, cascade-delete, and the required-name constraint.
Migration: lighting/migrations/16.0.1.4.0/post-migration.py drops
the two orphan DB objects left on a database that previously ran
PR #99 (now fully reverted in commits 1-5 of this PR):
* Table lighting_product_spare_part_rel (was the m2m relation)
* Column lighting_product_category.is_component (was stored Boolean)
Both verified empty on the target deployment before this work; the
IF EXISTS guards make the script idempotent on databases that never
ran PR #99.
Manifest bumped 16.0.1.0.0 -> 16.0.1.4.0 so the upgrade stays monotonic
on top of the currently deployed 16.0.1.3.0.
0040db2 to
b8bdcdd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.