Skip to content

Commit

Permalink
fix(Inventory/EditDialog): only add invoiceRecordPicker if Sales is a…
Browse files Browse the repository at this point in the history
…vailable
  • Loading branch information
pschuele committed Nov 12, 2024
1 parent 9637ad4 commit b5456a4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tine20/Inventory/js/InventoryItemEditDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Tine.Inventory.InventoryItemEditDialog = Ext.extend(Tine.widgets.dialog.EditDial
* @private
*/
getFormItems: function() {
if (Tine.Sales.Model?.PurchaseInvoice) {
if (Tine.Sales && Tine.Tinebase.common.hasRight('run', 'Sales') && Tine.Sales.Model?.PurchaseInvoice) {
const app = Tine.Tinebase.appMgr.get('Sales')
this.invoiceRecordPicker = Tine.widgets.form.RecordPickerManager.get('Sales', 'PurchaseInvoice', {
fieldLabel: app.i18n._('Purchase Invoice'),
Expand All @@ -77,7 +77,7 @@ Tine.Inventory.InventoryItemEditDialog = Ext.extend(Tine.widgets.dialog.EditDial
hideMode: 'offsets'
},
items: [{
//Start first tab
// Start first tab
title: this.app.i18n._('General'),
border: false,
frame: true,
Expand Down

0 comments on commit b5456a4

Please sign in to comment.