Merge pull request 'HOTFIX: Missing fields whe request getBuys' (!2785) from hotfix_entry_getBuys_fields into master
gitea/salix/pipeline/head This commit looks good Details

Reviewed-on: #2785
Reviewed-by: Guillermo Bonet <guillermo@verdnatura.es>
This commit is contained in:
Javier Segarra 2024-07-24 10:36:07 +00:00
commit d2cc6a77fe
1 changed files with 26 additions and 6 deletions

View File

@ -50,6 +50,7 @@ module.exports = Self => {
'stickers',
'packing',
'grouping',
'packing',
'groupingMode',
'quantity',
'packagingFk',
@ -79,7 +80,9 @@ module.exports = Self => {
fields: [
'id',
'typeFk',
'stems',
'name',
'category',
'subName',
'size',
'minPrice',
@ -95,14 +98,31 @@ module.exports = Self => {
'value9',
'tag10',
'value10',
'groupingMode'
'groupingMode',
'inkFk',
'originFk',
'producerFk'
],
include: {
relation: 'itemType',
scope: {
fields: ['code', 'description']
include: [
{
relation: 'itemType',
scope: {
fields: ['code', 'description']
}
},
{
relation: 'origin',
scope: {
fields: ['code']
}
},
{
relation: 'producer',
scope: {
fields: ['name']
}
}
}
]
}
}]
};