Skip to content

Adds "active" field for Company model#7024

Merged
SchrodingersGat merged 38 commits into
inventree:masterfrom
SchrodingersGat:company-active
Apr 20, 2024
Merged

Adds "active" field for Company model#7024
SchrodingersGat merged 38 commits into
inventree:masterfrom
SchrodingersGat:company-active

Conversation

@SchrodingersGat

@SchrodingersGat SchrodingersGat commented Apr 15, 2024

Copy link
Copy Markdown
Member

This PR adds the the ability to disable individual companies by setting an "active" flag for companies (suppliers / manufacturers / customers) allowing them to be disabled by the user.

Additionally, adds an "active" field to the SupplierPart model - so that a particular SupplierPart instance can be marked as disabled, but not removed from the database - for the purpose of retaining historical purchase order information.

TODO

  • Add new field and migrations
  • Expose to API and allow filtering
  • Update CUI company table
  • Update PUI company table
  • Filter SupplierPart list by supplier__active
  • Filter ManufacturerPart list by manufacturer__active
  • Hide inactive customers when creating new sales order
  • Hide inactive customers when creating new return order
  • Hide inactive suppliers when creating new purchase order
  • Hide inactive supplier parts in forms
  • add unit testing
  • improve documentation

@SchrodingersGat SchrodingersGat added enhancement This is an suggested enhancement or new feature order Related to purchase orders / sales orders api Relates to the API User Interface Related to the frontend / User Interface labels Apr 15, 2024
@SchrodingersGat SchrodingersGat added this to the 0.15.0 milestone Apr 15, 2024
@netlify

netlify Bot commented Apr 15, 2024

Copy link
Copy Markdown

Deploy Preview for inventree-web-pui-preview ready!

Name Link
🔨 Latest commit 82501f2
🔍 Latest deploy log https://app.netlify.com/sites/inventree-web-pui-preview/deploys/6623ac7618ead3000821d89e
😎 Deploy Preview https://deploy-preview-7024--inventree-web-pui-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 100 (no change from production)
Accessibility: 86 (no change from production)
Best Practices: 100 (no change from production)
SEO: 70 (no change from production)
PWA: -
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

@codecov

codecov Bot commented Apr 15, 2024

Copy link
Copy Markdown

Codecov Report

Attention: Patch coverage is 98.00000% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 83.24%. Comparing base (cd53f21) to head (82501f2).
Report is 2 commits behind head on master.

Files Patch % Lines
src/backend/InvenTree/InvenTree/settings.py 83.33% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7024      +/-   ##
==========================================
+ Coverage   83.17%   83.24%   +0.06%     
==========================================
  Files        1039     1038       -1     
  Lines       45515    45493      -22     
  Branches     1254     1244      -10     
==========================================
+ Hits        37857    37870      +13     
+ Misses       7405     7376      -29     
+ Partials      253      247       -6     
Flag Coverage Δ
backend 85.45% <98.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

* Add "currency" to CompanyBriefSerializer

* Fix nav.js bug - potential illegal chars in panel name

* Update CUI tables

* Update PUI tables

* Bump API version
@SchrodingersGat

Copy link
Copy Markdown
Member Author

@matmair having some issues with the playwright tests here - it gets most of the way through but the "submit" button in one of the modal forms does not activate, even if I change the value of a field in the form. Any ideas here? I think this was one of the tests you added just recently so presumably it does work...

@SchrodingersGat SchrodingersGat merged commit 2fe0eef into inventree:master Apr 20, 2024
@SchrodingersGat SchrodingersGat deleted the company-active branch April 20, 2024 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api Relates to the API enhancement This is an suggested enhancement or new feature order Related to purchase orders / sales orders User Interface Related to the frontend / User Interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] Add "active" flag to Company model

1 participant