Skip to content

[16.0][IMP] lighting: free-text spare parts field on lighting.product#100

Merged
eantones merged 6 commits into
16.0from
16.0-imp-lighting-product-spare-part-free
May 15, 2026
Merged

[16.0][IMP] lighting: free-text spare parts field on lighting.product#100
eantones merged 6 commits into
16.0from
16.0-imp-lighting-product-spare-part-free

Conversation

@deeniiz
Copy link
Copy Markdown
Collaborator

@deeniiz deeniiz commented May 15, 2026

No description provided.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 15, 2026

Codecov Report

❌ Patch coverage is 97.72727% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 43.91%. Comparing base (74cc703) to head (b8bdcdd).

Files with missing lines Patch % Lines
lighting/models/product_category.py 50.00% 1 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@deeniiz deeniiz requested a review from eantones May 15, 2026 09:56
@deeniiz deeniiz added the to review Must be reviewed label May 15, 2026
@deeniiz deeniiz force-pushed the 16.0-imp-lighting-product-spare-part-free branch 3 times, most recently from 90b7aae to 4e9146a Compare May 15, 2026 12:30
eantones added 6 commits May 15, 2026 15:59
…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.
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.
@eantones eantones force-pushed the 16.0-imp-lighting-product-spare-part-free branch from 0040db2 to b8bdcdd Compare May 15, 2026 14:19
Copy link
Copy Markdown
Member

@eantones eantones left a comment

Choose a reason for hiding this comment

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

LGTM!

@eantones eantones merged commit 2bf6baa into 16.0 May 15, 2026
6 checks passed
@eantones eantones deleted the 16.0-imp-lighting-product-spare-part-free branch May 15, 2026 17:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

to review Must be reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants