Openbravo Issue Tracking System - Retail Modules
View Issue Details
0041383Retail ModulesDiscounts and Promotionspublic2019-07-17 16:412019-08-22 14:44
inaki_garcia 
guilleaer 
immediatemajoralways
closedfixed 
5
main 
RR19Q4 
jorge-garcia
QA functional test
2019-02-22
RR18Q3
https://code.openbravo.com/erp/devel/pi/rev/73c8bbf59361 [^]
No
0041383: [19Q3] [D&P per hour] Discount or promotion can no longer be correctly created and used
Due to the newly introduced "Discounts and Promotions per Hour" module extension, creating a discount or promotion in the usual workflow will lead to it not working. This is due to the newly added "Availability" section when creating a new discount or promotion, which has made it mandatory to have some of the the checkboxes checked in order to make the discount or promotion available for use when adding products to a ticket.

This issue is considered a regression, not because an error introduced in an existing project, but due to the disruption of the standard flow as a result of the introduction of this new functionality.
PRECONDITION: the "Discounts and Promotions per Hour" module must be installed alongside the standard "Discounts and Promotions" module

** Behaviour prior to the introduction of the module (19Q2 and earlier) **
-- Backend
0. Log in the ERP
1. Create a discount which isn't discretionary (p.e. "Price Adjustment" type) in the "Discounts and Promotions" window.
Fill all mandatory fields (highlighted in yellow), and add a Product by setting the "Included Products *" to "Only those defined"
and by creating a new record in the "Products" subtab

-- Frontend
0. Log in the Web POS as "vallblanca"
1. Add the product the discount has been created for
2. The discount is correctly added to the list item of the product



** Current behaviour **
- Execute steps 0 and 1 of Backend and Frontend
NOTICE that in step 2. of Frontend, the discount hasn't been correctly applied

-- Backend
2. Check the "All Week" checkbox in the availability section of the Discount, or check the current weekday and leave the Start/Ending Times blank

-- Frontend
- Execute steps 0 to 2 of Frontend
NOTICE that the discount is now correctly added

No tags attached.
depends on backport 0041398RR19Q3 closed guilleaer [19Q3] [D&P per hour] Discount or promotion can no longer be correctly created and used 
Issue History
2019-07-17 16:41inaki_garciaNew Issue
2019-07-17 16:41inaki_garciaAssigned To => Retail
2019-07-17 16:41inaki_garciaTriggers an Emergency Pack => No
2019-07-17 17:08inaki_garciaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=19150#r19150
2019-07-18 16:41guilleaerStatusnew => scheduled
2019-07-18 16:41guilleaerAssigned ToRetail => guilleaer
2019-07-18 16:49hgbotCheckin
2019-07-18 16:49hgbotNote Added: 0113529
2019-07-18 16:49hgbotStatusscheduled => resolved
2019-07-18 16:49hgbotResolutionopen => fixed
2019-07-18 16:49hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/a6c7fb43ae23162df5e13dd65400238f5b16da13 [^]
2019-07-18 17:22jorge-garciaReview Assigned To => jorge-garcia
2019-07-18 17:22jorge-garciaNote Added: 0113535
2019-07-18 17:22jorge-garciaStatusresolved => closed
2019-07-18 17:22jorge-garciaFixed in Version => RR19Q4
2019-07-18 17:30guilleaerRegression level => QA functional test
2019-07-18 17:30guilleaerRegression date => 2019-02-22
2019-07-18 17:30guilleaerRegression introduced in release => RR18Q3
2019-07-18 17:30guilleaerRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/73c8bbf59361 [^]
2019-07-19 07:42hgbotCheckin
2019-07-19 07:42hgbotNote Added: 0113541
2019-07-19 07:55guilleaerStatusclosed => new
2019-07-19 07:55guilleaerResolutionfixed => open
2019-07-19 07:55guilleaerFixed in VersionRR19Q4 =>
2019-07-19 07:55guilleaerStatusnew => scheduled
2019-07-22 13:52hgbotCheckin
2019-07-22 13:52hgbotNote Added: 0113564
2019-07-22 13:53hgbotCheckin
2019-07-22 13:53hgbotNote Added: 0113565
2019-07-22 13:53hgbotStatusscheduled => resolved
2019-07-22 13:53hgbotResolutionopen => fixed
2019-07-22 13:53hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/devel/pi/rev/a6c7fb43ae23162df5e13dd65400238f5b16da13 [^] => http://code.openbravo.com/erp/devel/pi/rev/81de09b49dadfc03f929336ff0bb061b150ab91b [^]
2019-07-23 13:45guilleaerNote Added: 0113596
2019-07-23 13:52jorge-garciaNote Added: 0113597
2019-07-23 13:52jorge-garciaStatusresolved => closed
2019-07-23 13:52jorge-garciaFixed in Version => RR19Q4
2019-08-22 14:44hudsonbotCheckin
2019-08-22 14:44hudsonbotNote Added: 0114161
2019-08-22 14:44hudsonbotCheckin
2019-08-22 14:44hudsonbotNote Added: 0114164
2019-08-22 14:44hudsonbotCheckin
2019-08-22 14:44hudsonbotNote Added: 0114171

Notes
(0113529)
hgbot   
2019-07-18 16:49   
Repository: erp/devel/pi
Changeset: a6c7fb43ae23162df5e13dd65400238f5b16da13
Author: Guillermo Alvarez de Eulate <guillermo.alvarez <at> openbravo.com>
Date: Thu Jul 18 16:48:49 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/a6c7fb43ae23162df5e13dd65400238f5b16da13 [^]

Fixed issue 41383: Discounts should be available all week by default

After add new feature to define discounts per hours, previous discounts present in the database must be marked as -allweek-. When the development was done developer tried to do it but forgot to define default in AD. Also is needed to set the column as required to update previous registers with Y

---
M src-db/database/model/tables/M_OFFER.xml
M src-db/database/sourcedata/AD_COLUMN.xml
---
(0113535)
jorge-garcia   
2019-07-18 17:22   
Code reviewed and tested
(0113541)
hgbot   
2019-07-19 07:42   
Repository: erp/devel/pi
Changeset: b5dfc1e0749d2d3ed03bb2f0a1d600e8f3c9fc78
Author: Guillermo Alvarez de Eulate <guillermo.alvarez <at> openbravo.com>
Date: Fri Jul 19 07:41:48 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/b5dfc1e0749d2d3ed03bb2f0a1d600e8f3c9fc78 [^]

Related to issue 41383: Backed out changeset a6c7fb43ae23 because it is an API change.

The fix its correct but it is an API change. Will be pushed again after manage API change properly.

---
M src-db/database/model/tables/M_OFFER.xml
M src-db/database/sourcedata/AD_COLUMN.xml
---
(0113564)
hgbot   
2019-07-22 13:52   
Repository: erp/devel/api-checks
Changeset: 3e1a8884e6e61d24de1d2bbe3c04db2ca084eb52
Author: Guillermo Alvarez de Eulate <guillermo.alvarez <at> openbravo.com>
Date: Mon Jul 22 09:07:12 2019 +0200
URL: http://code.openbravo.com/erp/devel/api-checks/rev/3e1a8884e6e61d24de1d2bbe3c04db2ca084eb52 [^]

Related to issue 41383: Update API tool

---
M model/src-db/database/model/tables/M_OFFER.xml
M model/src-db/database/sourcedata/AD_COLUMN.xml
---
(0113565)
hgbot   
2019-07-22 13:53   
Repository: erp/devel/pi
Changeset: 81de09b49dadfc03f929336ff0bb061b150ab91b
Author: Guillermo Alvarez de Eulate <guillermo.alvarez <at> openbravo.com>
Date: Fri Jul 19 12:58:33 2019 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/81de09b49dadfc03f929336ff0bb061b150ab91b [^]

Fixed issue 41383: Discounts should be available all week by default

After add new feature to define discounts per hours, previous discounts present in the database must be marked as -allweek-. When the development was done developer tried to do it but forgot to define default in AD. Also is needed to set the column as required to update previous registers with Y

---
M src-db/database/model/tables/M_OFFER.xml
M src-db/database/sourcedata/AD_COLUMN.xml
---
(0113596)
guilleaer   
2019-07-23 13:45   
Regarding API change, To put more light here

Accept change to 'not null' for M_OFFER.ALLWEEKDAYS column as false positive.

That column was recently added (for 19Q3) release as nullable (wrongly).
Issue xx makes the column now mandatory and this change will be backported
to 19Q3 release directly.
That means ALLWEEKDAYS will have never been published as nullable so this
is not an api-change but managed as false positive.
(0113597)
jorge-garcia   
2019-07-23 13:52   
Code and API change reviewed and tested
(0114161)
hudsonbot   
2019-08-22 14:44   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/ad3efd3bd07c [^]
Maturity status: Test
(0114164)
hudsonbot   
2019-08-22 14:44   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/ad3efd3bd07c [^]
Maturity status: Test
(0114171)
hudsonbot   
2019-08-22 14:44   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/ad3efd3bd07c [^]
Maturity status: Test