Openbravo Issue Tracking System - Retail Modules
View Issue Details
0044866Retail ModulesWeb POSpublic2020-08-21 13:502020-09-14 10:45
migueldejuana 
gorka_gil 
normalmajoralways
closedfixed 
5
 
RR20Q4 
marvintm
Production - QA Approved
2020-05-28
RR20Q3
No
0044866: Masterdata refresh is not working correctly in Remote mode
Masterdata refresh (full and incremental) are currently not taking into account correctly the Remote mode settings.

The remote mode itself works correctly: when it is enabled either for business partner, or products, the WebPOS correctly takes it into account in the UI (for example disabling the BROWSE component), and the functionality itself also works according to the configuration (products and customers are searched remotely and retrieved from the backend dynamically).

However, the masterdata refresh processes do not take the setting into account correctly, and they attempt to load information for this models into the IndexedDB database, even when the configuration is enabled. This is not correct.
- Clean cache
- Set Product remote mode preference
- Do login
- Check IndexedDB Product Store. ERROR! It has data and it shouldn't.

(the same thing happens for Business Partner remote mode)
The remote mode configuration needs to be taken into account by the MasterdataController, so the refresh process ignores models affected by it if it is enabled, and IndexedDB stores are not created for them.
No tags attached.
depends on backport 0044876RR20Q3.1 closed gorka_gil Masterdata refresh is not working correctly in Remote mode 
Issue History
2020-08-21 13:50migueldejuanaNew Issue
2020-08-21 13:50migueldejuanaAssigned To => Retail
2020-08-21 13:50migueldejuanaTriggers an Emergency Pack => No
2020-08-24 07:13marvintmSummaryEnsure Remote Mode is working for IndexedDB Models => Masterdata refresh is not working correctly in Remote mode
2020-08-24 07:13marvintmDescription Updatedbug_revision_view_page.php?rev_id=21521#r21521
2020-08-24 07:13marvintmSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=21523#r21523
2020-08-24 07:13marvintmProposed Solution updated
2020-08-24 07:15marvintmRegression level => Production - QA Approved
2020-08-24 07:15marvintmRegression date => 2020-05-28
2020-08-24 07:15marvintmRegression introduced in release => RR20Q3
2020-08-24 12:04gorka_gilAssigned ToRetail => gorka_gil
2020-08-24 12:07gorka_gilStatusnew => scheduled
2020-09-14 10:40hgbotResolutionopen => fixed
2020-09-14 10:40hgbotStatusscheduled => resolved
2020-09-14 10:40hgbotFixed in Version => RR20Q4
2020-09-14 10:40hgbotNote Added: 0123000
2020-09-14 10:40hgbotNote Added: 0123001
2020-09-14 10:40hgbotNote Added: 0123002
2020-09-14 10:40hgbotNote Added: 0123003
2020-09-14 10:40hgbotNote Added: 0123004
2020-09-14 10:40hgbotNote Added: 0123005
2020-09-14 10:40hgbotNote Added: 0123006
2020-09-14 10:40hgbotNote Added: 0123007
2020-09-14 10:40hgbotNote Added: 0123008
2020-09-14 10:40hgbotNote Added: 0123009
2020-09-14 10:40hgbotNote Added: 0123010
2020-09-14 10:40hgbotNote Added: 0123011
2020-09-14 10:41hgbotNote Added: 0123012
2020-09-14 10:41hgbotNote Added: 0123013
2020-09-14 10:45gorka_gilReview Assigned To => marvintm
2020-09-14 10:45gorka_gilStatusresolved => closed

Notes
(0123000)
hgbot   
2020-09-14 10:40   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 373ddab3b0462a45d942b97620b168d55b261644
Author: Gorka Gil <gorka.gil@openbravo.com>
Date: 2020-09-14T08:39:42+00:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/373ddab3b0462a45d942b97620b168d55b261644 [^]

Fixed ISSUE-44866: fix masterdata refresh for remote models

---
M web/org.openbravo.retail.posterminal/app/model/masterdata/BusinessPartnerLocationModel.js
M web/org.openbravo.retail.posterminal/app/model/masterdata/BusinessPartnerModel.js
M web/org.openbravo.retail.posterminal/app/model/masterdata/CharacteristicModel.js
M web/org.openbravo.retail.posterminal/app/model/masterdata/CharacteristicValueModel.js
M web/org.openbravo.retail.posterminal/app/model/masterdata/ProductCharacteristicValueModel.js
M web/org.openbravo.retail.posterminal/app/model/masterdata/ProductModel.js
M web/org.openbravo.retail.posterminal/app/model/masterdata/ProductPriceModel.js
M web/org.openbravo.retail.posterminal/app/model/masterdata/ProductServiceLinkedModel.js
M web/org.openbravo.retail.posterminal/app/model/masterdata/ServicePriceRuleModel.js
M web/org.openbravo.retail.posterminal/app/model/masterdata/ServicePriceRuleRangeModel.js
M web/org.openbravo.retail.posterminal/app/model/masterdata/ServicePriceRuleRangePricesModel.js
M web/org.openbravo.retail.posterminal/app/model/masterdata/ServicePriceRuleVersionModel.js
M web/org.openbravo.retail.posterminal/app/model/masterdata/ServiceProductCategoryModel.js
M web/org.openbravo.retail.posterminal/app/model/masterdata/ServiceProductModel.js
M web/org.openbravo.retail.posterminal/app/model/masterdata/discount/DiscountFilterBusinessPartnerModel.js
---
(0123001)
hgbot   
2020-09-14 10:40   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 3c71571d7128aa5202d8543fde7ec7afe01306bb
Author: Gorka Gil <gorka.gil@openbravo.com>
Date: 2020-09-14T08:39:42+00:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/3c71571d7128aa5202d8543fde7ec7afe01306bb [^]

Related to ISSUE-44866: Fix change bp in mpl with remote produtcs

Changing bussiness partner in multiprice list, removes and adds
again all the ticket lines, but when adding the new lines
the remotes products were not found, so was failing to add the lines

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0123002)
hgbot   
2020-09-14 10:40   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 3c7981379de5001e054e0c3d433e5d09f51008c1
Author: Gorka Gil <gorka.gil@openbravo.com>
Date: 2020-09-14T08:39:42+00:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/3c7981379de5001e054e0c3d433e5d09f51008c1 [^]

Related to ISSUE-44866: Fix error when moving a quotation to sales order in remote mode

The problem was that when opening a quotation from the pos,
the products of the lines are loaded with LoadedProduct instead Product serviceRequest,
this leads to some missing properties like in this case obposEditablePrice,
that was used for the validations

---
M web/org.openbravo.retail.posterminal/js/utils/ticketListUtils.js
---
(0123003)
hgbot   
2020-09-14 10:40   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 13854350e0ebccbaa80add2b3c8b1c6c0b83bc2f
Author: Gorka Gil <gorka.gil@openbravo.com>
Date: 2020-09-14T08:39:42+00:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/13854350e0ebccbaa80add2b3c8b1c6c0b83bc2f [^]

Related to ISSUE-44866: fix overwrite of shared variable in open receipt

the iter variable gets overwrited from others for loops,
passed as parameter to addLineForProduct,
and created a function to mantain the iter for the success callback of the ob.dal.get

---
M web/org.openbravo.retail.posterminal/js/utils/ticketListUtils.js
---
(0123004)
hgbot   
2020-09-14 10:40   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: d32d505c623adae85de1d06ebeb12ae5c9751361
Author: Gorka Gil <gorka.gil@openbravo.com>
Date: 2020-09-14T08:39:42+00:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/d32d505c623adae85de1d06ebeb12ae5c9751361 [^]

Related to ISSUE-44866: fix in open receipt on remote mode all lines with same price

After the last fix to avoid the overwrite of iter, were missing also some variables
price, lineGross, and lineNet. Removed the properties and calculate inside
the function based on the correct iter

---
M web/org.openbravo.retail.posterminal/js/utils/ticketListUtils.js
---
(0123005)
hgbot   
2020-09-14 10:40   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal [^]
Changeset: 43b54ffc75f856f6431c188ed29958184989d7a4
Author: Gorka Gil <gorka.gil@openbravo.com>
Date: 2020-09-14T08:39:42+00:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.posterminal/-/commit/43b54ffc75f856f6431c188ed29958184989d7a4 [^]

Related to ISSUE-44866: Fix the expand of packs with remote products

---
M web-test/model/business-logic/pack/Pack.test.js
M web/org.openbravo.retail.posterminal/app/model/business-logic/pack/Pack.js
---
(0123006)
hgbot   
2020-09-14 10:40   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^]
Changeset: 5197b6408731e8632518a52ac5ac300e442a0d3e
Author: Gorka Gil <gorka.gil@openbravo.com>
Date: 2020-09-10T20:37:30+02:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/5197b6408731e8632518a52ac5ac300e442a0d3e [^]

Related to ISSUE-44866: fix masterdata refresh for remote models

Add support for remote models in the indexeddb masterdata models

---
M web/org.openbravo.mobile.core/app/model/masterdata/MasterdataController.js
M web/org.openbravo.mobile.core/app/model/masterdata/MasterdataModel.js
---
(0123007)
hgbot   
2020-09-14 10:40   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^]
Changeset: b034a2de516104143bb6eb0daac28c758af61085
Author: Gorka Gil <gorka.gil@openbravo.com>
Date: 2020-09-10T20:37:30+02:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/b034a2de516104143bb6eb0daac28c758af61085 [^]

Related to ISSUE-44866: change masterdata endpoint to use the new method isRemote from the model

---
M web/org.openbravo.mobile.core/app/model/synchronization-buffer/MasterdataEndpoint.js
---
(0123008)
hgbot   
2020-09-14 10:40   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core [^]
Changeset: 7421e3df8215b6eeceee3202b77e8bdaf55c6169
Author: Gorka Gil <gorka.gil@openbravo.com>
Date: 2020-09-10T20:37:30+02:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.mobile.core/-/commit/7421e3df8215b6eeceee3202b77e8bdaf55c6169 [^]

Related to ISSUE-44866: create wrapper OB.App.DAL.remoteGet

Since await ob.dal.get doesn't work, it is possible to use this wrapper
and use await OB.App.DAL.remoteGet

---
M web/org.openbravo.mobile.core/app/util/DAL.js
---
(0123009)
hgbot   
2020-09-14 10:40   
Repository: https://gitlab.com/openbravo/ci/mobile-test [^]
Changeset: ad2bfb025c148682c102b0fedcdba692792e1648
Author: Gorka Gil <gorka.gil@openbravo.com>
Date: 2020-09-14T08:40:39+00:00
URL: https://gitlab.com/openbravo/ci/mobile-test/-/commit/ad2bfb025c148682c102b0fedcdba692792e1648 [^]

Related to ISSUE-44866: Fix test I35931_SaveCorrectlyCustomerShipmentAndBillingInfo

There is no longermasterdata info of bp in the indexeddb tables,
and needed to check in the state

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/system/I35931_SaveCorrectlyCustomerShipmentAndBillingInfo.java
---
(0123010)
hgbot   
2020-09-14 10:40   
Repository: https://gitlab.com/openbravo/ci/mobile-test [^]
Changeset: 283433bec9f3ef7782309ae00f4fa741870fe20f
Author: Gorka Gil <gorka.gil@openbravo.com>
Date: 2020-09-14T08:40:39+00:00
URL: https://gitlab.com/openbravo/ci/mobile-test/-/commit/283433bec9f3ef7782309ae00f4fa741870fe20f [^]

Related to ISSUE-44866: disable test BPSet_DiscountTest in highvol

It was enable in 20q3, but was working because by current bug (44866)
the model DiscountFilterBusinessPartner was loaded into indexedDB,
although preference OBPOS_remote.discount.bp was specified.

Now that this table is correctly not loaded in remote,
this test fail in remote (highvol) like previously to 20q3

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/discountsandpromotions/BPSet_DiscountTest.java
---
(0123011)
hgbot   
2020-09-14 10:40   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.returns [^]
Changeset: 4e060626d9d5645fa3201bd61680158bac175343
Author: Gorka Gil <gorka.gil@openbravo.com>
Date: 2020-09-10T20:37:30+02:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.returns/-/commit/4e060626d9d5645fa3201bd61680158bac175343 [^]

Related to ISSUE-44866: fix get of remote product in returns

Revert removal of OB.Dal.get in product for returns

---
M web/org.openbravo.retail.returns/js/returnUtils.js
---
(0123012)
hgbot   
2020-09-14 10:41   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards [^]
Changeset: 05704f2c7e31de102b8ebd96f8014b9fd00ff828
Author: Gorka Gil <gorka.gil@openbravo.com>
Date: 2020-09-14T08:40:56+00:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.giftcards/-/commit/05704f2c7e31de102b8ebd96f8014b9fd00ff828 [^]

Related to ISSUE-44866: fix remote products in gift cards

---
M web/org.openbravo.retail.giftcards/js/components/GiftCardDetails.js
---
(0123013)
hgbot   
2020-09-14 10:41   
Repository: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.activediscountspopup [^]
Changeset: 1da122074fdf1e0209632c522180c4eecfa60ed2
Author: Gorka Gil <gorka.gil@openbravo.com>
Date: 2020-09-10T20:28:49+02:00
URL: https://gitlab.com/openbravo/product/pmods/org.openbravo.retail.activediscountspopup/-/commit/1da122074fdf1e0209632c522180c4eecfa60ed2 [^]

Related to ISSUE-44866: fix active discounts popup with remote products

---
M web/org.openbravo.retail.activediscountspopup/js/active-discounts-components.js
---