Openbravo Issue Tracking System - Retail Modules
View Issue Details
0030806Retail ModulesWeb POSpublic2015-09-09 16:072015-11-23 12:14
aaroncalero 
jorge-garcia 
normalmajoralways
closedfixed 
5
 
RR16Q1 
marvintm
No
0030806: The default sales representative is by default the current logged user, even if it not a Sales representative
The default value for the sales representative field of the Receipt Properties dialog is the currently logged user, even if this user is not a sales representative
Login in https://livebuilds.openbravo.com/retail_pi_pgsql/ [^]
Go to the User window and open the Vall Blanca Store User record
Navigate to the associated business partner (Vall Blanca User).
Go to the Employee tab and uncheck the Is Sales Representative checkbox.
Login in webPOS with the vallblanca user.
Open the receipt properties popup (menu > Receipt Properties).
Verify that the default sales representative is Vall Blanca Store User.
Verify that after opening the Sales Representative search modal, the Vall Blanca Store User is not shown, because it is not a sales representative.
If the currently logged user is not a sales representative, let it empty
No tags attached.
related to defect 0030804 closed mtaal The sales representative combo on the receipt properties popup is never loaded 
blocks defect 0031113 closed Orekaria Error shown in Web POS when loading quotations/layaways/receipts when Sales Representative is null. 
diff Issue30806_posterminal.diff (3,394) 2015-09-29 16:57
https://issues.openbravo.com/file_download.php?file_id=8494&type=bug
diff Issue30806_mobilecore.diff (1,963) 2015-09-29 16:58
https://issues.openbravo.com/file_download.php?file_id=8495&type=bug
Issue History
2015-09-09 16:07aaroncaleroNew Issue
2015-09-09 16:07aaroncaleroAssigned To => Retail
2015-09-09 16:07aaroncaleroTriggers an Emergency Pack => No
2015-09-16 10:39guillermogilResolution time => 1442872800
2015-09-16 19:16OrekariaProposed Solution updated
2015-09-29 14:35fmolinaNote Added: 0080706
2015-09-29 14:35fmolinaAssigned ToRetail => fmolina
2015-09-29 14:35fmolinaStatusnew => feedback
2015-09-29 15:34aaroncaleroNote Added: 0080708
2015-09-29 16:57aaroncaleroNote Added: 0080715
2015-09-29 16:57aaroncaleroFile Added: Issue30806_posterminal.diff
2015-09-29 16:58aaroncaleroFile Added: Issue30806_mobilecore.diff
2015-10-05 14:47aaroncaleroStatusfeedback => scheduled
2015-10-08 17:59guillermogilRelationship addedrelated to 0031113
2015-10-08 18:35OrekariaRelationship replacedblocks 0031113
2015-10-19 18:32OrekariaRelationship addedrelated to 0030804
2015-10-27 14:53hgbotCheckin
2015-10-27 14:53hgbotNote Added: 0081350
2015-10-27 14:53hgbotStatusscheduled => resolved
2015-10-27 14:53hgbotResolutionopen => fixed
2015-10-27 14:53hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/a58793d6557aac9f1d28f471e5f47c4d7059cfeb [^]
2015-10-27 14:54hgbotCheckin
2015-10-27 14:54hgbotNote Added: 0081351
2015-10-27 14:54hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/a58793d6557aac9f1d28f471e5f47c4d7059cfeb [^] => http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/cf92973150d1556db17bfb8e9b5122920e960635 [^]
2015-10-27 14:57hgbotCheckin
2015-10-27 14:57hgbotNote Added: 0081352
2015-10-30 12:24marvintmNote Added: 0081400
2015-10-30 12:24marvintmStatusresolved => new
2015-10-30 12:24marvintmResolutionfixed => open
2015-10-30 15:04OrekariaStatusnew => scheduled
2015-11-09 11:28jorge-garciaAssigned Tofmolina => jorge-garcia
2015-11-11 15:08hgbotCheckin
2015-11-11 15:08hgbotNote Added: 0081711
2015-11-11 15:08hgbotStatusscheduled => resolved
2015-11-11 15:08hgbotResolutionopen => fixed
2015-11-11 15:08hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/cf92973150d1556db17bfb8e9b5122920e960635 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/55961a4da3ed00565fc93636bbfb57bf05d2a159 [^]
2015-11-11 15:09hgbotCheckin
2015-11-11 15:09hgbotNote Added: 0081712
2015-11-11 15:09hgbotCheckin
2015-11-11 15:09hgbotNote Added: 0081713
2015-11-11 15:10hgbotCheckin
2015-11-11 15:10hgbotNote Added: 0081714
2015-11-13 14:43marvintmNote Added: 0081827
2015-11-13 14:43marvintmStatusresolved => new
2015-11-13 14:43marvintmResolutionfixed => open
2015-11-13 14:43marvintmStatusnew => scheduled
2015-11-20 10:46hgbotCheckin
2015-11-20 10:46hgbotNote Added: 0082011
2015-11-20 10:48hgbotCheckin
2015-11-20 10:48hgbotNote Added: 0082012
2015-11-20 10:50jorge-garciaStatusscheduled => resolved
2015-11-20 10:50jorge-garciaResolutionopen => fixed
2015-11-23 12:14marvintmReview Assigned To => marvintm
2015-11-23 12:14marvintmStatusresolved => closed
2015-11-23 12:14marvintmFixed in Version => RR16Q1

Notes
(0080706)
fmolina   
2015-09-29 14:35   
Cannot reproduce. When uncheck the Is Sales Representative checkbox the Vall Blanca Store User does not appear as default sales representative, and when check the checkbox the user appears as default, as expected.
(0080708)
aaroncalero   
2015-09-29 15:34   
Verify that the global receipt values still show the logged user as sales representative:
OB.MobileApp.model.receipt.get('salesRepresentative$_identifier') and
OB.MobileApp.model.receipt.get('salesRepresentative')
(0080715)
aaroncalero   
2015-09-29 16:57   
Also attaching diffs with a possible solution, which also allows to leave the sales rep empty.
(0081350)
hgbot   
2015-10-27 14:53   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: a58793d6557aac9f1d28f471e5f47c4d7059cfeb
Author: Facundo Molina <fmolina <at> koodu.es>
Date: Tue Oct 27 10:53:16 2015 -0300
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/a58793d6557aac9f1d28f471e5f47c4d7059cfeb [^]

Fixes issue 30806: The default sales representative is by default the current logged user, even if it not a Sales representative

---
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0081351)
hgbot   
2015-10-27 14:54   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: cf92973150d1556db17bfb8e9b5122920e960635
Author: Facundo Molina <fmolina <at> koodu.es>
Date: Tue Oct 27 08:43:28 2015 -0300
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/cf92973150d1556db17bfb8e9b5122920e960635 [^]

Fixes issue 30806: The default sales representative is by default the current logged user, even if it not a Sales representative

---
M src/org/openbravo/mobile/core/login/Context.java
---
(0081352)
hgbot   
2015-10-27 14:57   
Repository: tools/automation/pi-mobile
Changeset: c247fa4f73d7976bd4b9aede7fe4c7173f799e0d
Author: Facundo Molina <fmolina <at> koodu.es>
Date: Tue Oct 27 10:57:20 2015 -0300
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/c247fa4f73d7976bd4b9aede7fe4c7173f799e0d [^]

Related to issue 30806: The default sales representative is by default the current logged user, even if it not a Sales representative

---
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sales/I30806_CurrentUserIsNotSalesRepresentative.java
---
(0081400)
marvintm   
2015-10-30 12:24   
There are two main things which need to be changed:

- The information of the current user being sales representative shouldn't be on the Context. Instead a query should be done when logging in the Web POS, to know if the user is valid sales representative or not.

- The sales representative combo in Receipt properties should be loaded when the popup is open, so that it's not empty when the user is not a valid sales representative.
(0081711)
hgbot   
2015-11-11 15:08   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 55961a4da3ed00565fc93636bbfb57bf05d2a159
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Tue Nov 10 10:36:49 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/55961a4da3ed00565fc93636bbfb57bf05d2a159 [^]

Fixed issue 30806: The default sales representative is by default the current
logged user, even if it not a Sales representative

Changed the place where the POS checks if the logged user is a valid
representative from the Context to the login part.

If the current logged user is not a valid sales representative, we set as null
the sales representative filed in the receipt properties.

---
M web/org.openbravo.retail.posterminal/js/login/model/login-model.js
M web/org.openbravo.retail.posterminal/js/model/order.js
---
(0081712)
hgbot   
2015-11-11 15:09   
Repository: erp/pmods/org.openbravo.mobile.core
Changeset: db06d9a3abf226cd0b08068a74637dcd35205337
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Tue Nov 10 10:52:37 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.mobile.core/rev/db06d9a3abf226cd0b08068a74637dcd35205337 [^]

Related to issue 30806: The default sales representative is by default the
current logged user, even if it not a Sales representative

Changed the place where the POS checks if the logged user is a valid
representative from the Context to the login part.

---
M src/org/openbravo/mobile/core/login/Context.java
M web/org.openbravo.mobile.core/source/model/ob-terminal-model.js
---
(0081713)
hgbot   
2015-11-11 15:09   
Repository: erp/pmods/org.openbravo.retail.sampledata
Changeset: 9bd749ca857edca83d00ed2b419b8535e73eb3b8
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Tue Nov 10 10:40:08 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.sampledata/rev/9bd749ca857edca83d00ed2b419b8535e73eb3b8 [^]

Related to issue 30806: The default sales representative is by default the
current logged user, even if it not a Sales representative

We need to set Posets User as NOT Sales Representative for the test
I30806_CurrentUserIsNotSalesRepresentative.

---
M referencedata/sampledata/The_White_Valley_Group/C_BPARTNER.xml
---
(0081714)
hgbot   
2015-11-11 15:10   
Repository: tools/automation/pi-mobile
Changeset: cfb10e8fc414e8e0075fc24830059a4a6f58a773
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Tue Nov 10 10:42:23 2015 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/cfb10e8fc414e8e0075fc24830059a4a6f58a773 [^]

Verifies issue 30806: The default sales representative is by default the
current logged user, even if it not a Sales representative

Some changes are necessary in the test.

---
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/sales/I30806_CurrentUserIsNotSalesRepresentative.java
---
(0081827)
marvintm   
2015-11-13 14:43   
The sales representative combo should always have an empty value as an option, because setting the sales representative is not mandatory in a sales order.
(0082011)
hgbot   
2015-11-20 10:46   
Repository: erp/pmods/org.openbravo.retail.posterminal
Changeset: 353c7ba6d2953d2facef43f112727c03eab570e9
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Tue Nov 17 13:55:05 2015 +0100
URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.posterminal/rev/353c7ba6d2953d2facef43f112727c03eab570e9 [^]

Related to issue 30806: The default sales representative is by default the
current logged user, even if it not a Sales representative

It's necessary to add a empty sales representative in the receipt properties
becase the sales representative it's not a mandatory field and could be null.

---
M src-db/database/sourcedata/AD_MESSAGE.xml
M web/org.openbravo.retail.posterminal/js/components/modalreceiptproperties.js
M web/org.openbravo.retail.posterminal/js/components/salesrepresentative.js
---
(0082012)
hgbot   
2015-11-20 10:48   
Repository: tools/automation/pi-mobile
Changeset: 14c93809f7accd014008aac182c9cec4a368c9c1
Author: Jorge Garcia <jorge.garcia <at> openbravo.com>
Date: Wed Nov 18 18:07:36 2015 +0100
URL: http://code.openbravo.com/tools/automation/pi-mobile/rev/14c93809f7accd014008aac182c9cec4a368c9c1 [^]

Verifies issue 30806: The default sales representative is by default the current
logged user, even if it not a Sales representative

Added test I30806_SelectABlankSalesRepresentative.

Test I30804_SetSalesRepCombo must be changed due to the new changes in the sales
representative combo and search (modal).

---
M src-test/org/openbravo/test/mobile/common/selenium/javascript/TestId.java
M src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/receipts/I30804_SetSalesRepCombo.java
A src-test/org/openbravo/test/mobile/retail/pack/selenium/tests/receipts/I30806_SelectABlankSalesRepresentative.java
---