(OFBIZ-11435)
Also, added deprecated since tag in some old entities and fields. This is done as per current policy to deprecate entities/services.
Thanks Pierre for reporting and Jacques for review.
* Fixed: Specified key was too long; max key length is 767 bytes for ProductPromoCodeEmail entity.
(OFBIZ-5426)
The problem is in the entity model. An email address should not be used in the primary key - mainly because an email address is case-insensitive. A better design would be to use the email address contact mechanism ID in the primary key.
Done Following:
1. Changed Entity Name from ProductPromoCodeEmail to ProductPromoCodeContMech
2. Related Changes for the entity name change
3. Migration service to migrate old data
Thanks, Leon for the report and Adrian Crum, Jacques Le Roux, Ingo Wolfmayr, Deepak Dixit, Pierre Smits and Gil Portenseigne for the discussion and review.
* Improved: Added new line in service definition file and lincence in MigrationServices file.
(OFBIZ-5426)
Thanks, Jacopo for the review.
(OFBIZ-10150)
During some data migration I hit an issue where my data for supplierProductId
was too long. So I looked up the fields and noticed that the order item entity
had a different type for the field than the supplier product entity.
jleroux: we should do it for all cases
Thanks: jesse thomas for report and Rohit Hukkeri for the fix
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1862271 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10761)
Remove deprecated entity fields deprecated for more 10 years and without impact with source code
Add since deprecate release on comment for PartyAcctgPreference definition and demo data to help the next analyse
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1850182 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10540)
I introduced two waring on log with the commit OFBIZ-10514 (Refactoring ContactMechWorker.get[Entity]ContactMechValueMap)
Thanks to Deepak Nigam to raise and correct it
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1839965 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10514)
ContactMechWorker.get[Entity]ContactMechValueMaps are old historic functions that resolve all contact mech context related to an Entity (Party, Facility, Order, WorkEffort).
The problem that they create too many db call during their execution that decrease OFBiz performance when the contactMech history grow.
A solution use to improve the process speed was replace all db call through *GenericValue.getRelated* function by *Delegator.makeValidValue* to instanciate each GenericValue needed after an unique search call on a viewEntity. For the four entities : Party, Facility, Order and WorkEffort, I use the same view structure with a sub view entity on ContactMechDetail. This offer more genericity and permit to slim code.
This commit introduce a regression on genericValue resolved for ContactMechType and ContactMechPurposeType that currently lost their description, it's actually not awkward because theses genericValue use the function .get("description", locale) to resolve the description so call directly the label system.
For Order and WorkEffort, I merged the resolving process in one function, that can be extend later easily for some other entity like Invoice or Quote.
The new FtpAddress wasn't managed by this worker so I introduce it to keep the coherence.
Last improvement, I use
getPartyContactMechValueMaps(Delegator delegator, String partyId, Timestamp date, String contactMechTypeId)
instead of
getPartyContactMechValueMaps(Delegator delegator, String partyId, boolean showOld, String contactMechTypeId)
to offert also more possibility to resolve at date instead just use now or all.
icing on the cake, I added groovy test to control this worker
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1838349 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10370)
Currently promotion rule engine works with :
entities ProductPromoCond et ProductPromoAction
java linear function ProductPromoWorker.checkCondition() (ProductPromoWorker:910) and ProductPromoWorker.performAction (ProductPromoWorker:1423)
Enumeration list to indicate on java function what piece of code to activate the control or action
The problem with this structure is when you want to create a new case of condition or action, you need to modify the framework code base.
We convert the 2 big java leaner function to service representation with one service by case. To realize it we introduce a relation with CustomMethod :
ProductPromoRule --> ProductPromoCond -> CustomMethod
-> ProductPromoAction -> CustomMethod
Each functions's case are converted to service with a related CustomMethod.
With this pattern now you can write your own condition rule and action rule on your plugin and link it on the promo engine
For backward compatibility purpose, current "PPIP" enumeration entries receive in enumCode data the new corresponding customMethodId reference, to ensure that old data works fine with the new engine
on EntityData
<CustomMethod customMethodId="PPC_PRODUCT_AMOUNT" customMethodTypeId="PRODUCT_PROMO_COND" customMethodName="productPromoCondProductAmount" description="Product amount"/>
<Enumeration enumId="PPIP_PRODUCT_AMOUNT" enumCode="PPC_PRODUCT_AMOUNT"/><!--link enumeration with customMethod for backward compatibility-->
on Java
//for backward compatibility resolve customMethodId from enumCode
GenericValue condEnum = EntityQuery.use(delegator).from("Enumeration").where("enumId", inputParamEnumId).cache().queryOne();
if (condEnum != null) {
customMethod = EntityQuery.use(delegator).from("CustomMethod").where("customMethodId", condEnum.get("enumCode")).cache().queryOne();
if (customMethod == null) {
Debug.logWarning("The oldest enumeration " + inputParamEnumId + " for promo " + productPromoCond.getPkShortValueString() + " haven't the new customMethod to use, please check your data or load seed data", module);
return false;
}
serviceName = customMethod.getString("customMethodName");
}
Many thanks to Ziri Khalifa and Leila Mekika for their helping work
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1831783 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10040)
Creates a new entity facilityCalendar which will create the one-to-many
relationship between facility and calendar. Here are the entity attributes:
*FacilityCalendar*
* facilityId*
* calendarId*
* facilityCalendarTypeId*
* fromDate*
* thruDate
*FacilityCalendarType*
* facilityCalendarTypeId*
* parentTypeId
* description
A calendar will be used to store opening time, closing time, working weekdays
and all this type of stuff.
For further information please refer
http://ofbiz.markmail.org/message/nectwaze6ina7y6z
Thanks: Vaibhav Jain for the initial proposition and all people who participated
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1817347 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9368)
As suggested by Jacques and Pierre, the patch includes removing all the traces
of OEMPartyId (manufacturerPartyId) as it was some old approach.
Changes in Patch:
1. Removed manufacturerPartyId from Product entity
2. Removed its relations from view entities namely GoodIdentificationAndProduct
3. Removed it from forms EditProduct (Product),
SearchInventoryItemsParams (EditFacilityInventoryItems screen in Facility) and
SearchInventoryItemsDetailsParams (ViewFacilityInventoryItemsDetails screen in
Facility)
Thanks: Aditya Sharma
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1804408 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-7120)
This is the first patch from the ticket and is for the implementation done to support the multisite feature in specialpurpose/cmssite component.
Thanks Mohammed Rehan Khan for the contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1761150 13f79535-47bb-0310-9956-ffa450edef68
On starting ofbiz server following error is coming at console :
2016-08-27 11:53:54,084 |delegator-startup-1 |ModelViewEntity |I| [InventoryItemAndLocation]: Throwing out field alias in view entity because one already exists with the alias name [inventoryItemTypeId] and field name [PR(Product).inventoryItemTypeId], existing field name is [II.inventoryItemTypeId] 2016-08-27 11:53:54,088 |delegator-startup-1 |ModelViewEntity |I| [ProductInventoryItem]: Throwing out field alias in view entity because one already exists with the alias name [inventoryItemTypeId] and field name [II(InventoryItem).inventoryItemTypeId], existing field name is [PR.inventoryItemTypeId]
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1757968 13f79535-47bb-0310-9956-ffa450edef68
===================================
Add "changeByUserLoginId" field for InventoryItemStatus
===================================
Thanks Nameet and Renuka for your contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1757956 13f79535-47bb-0310-9956-ffa450edef68
New ProductPriceType 'SHIPPING_ALLOWANCE' and a new minimumPrice field in ProductStoreShipmentMeth entity.
========================================
New price type "SHIPPING_ALLOWANCE" can be used in the scenarios where default/list prices are comprehensive of the 'Shipping Cost' quota, this price type can help user to set the Shipping Allowance cost he has included in the the product's default/list price and then modify actual shipping cost by reducing the allowance cost from it.
minimumPrice field can be used to set the the lowest rate for a particular shipping type.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1748969 13f79535-47bb-0310-9956-ffa450edef68
=======================================
Extend Product entity and add serialized field
=======================================
Thanks Avnindra for your patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1745592 13f79535-47bb-0310-9956-ffa450edef68
Currently there is no Uom selector in the terms form. And the display field in the terms list form only shows the uomId.
jleroux: I noticed that none of the *TypeAttr entities has a description field, why not adding it to them all?
Pierre: This patch addresses the issue in all applicable entities, and replaces the previously provided patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1743422 13f79535-47bb-0310-9956-ffa450edef68
Currently, in ecommerce/tiny-gismo-GZ-1000-p a comment field is shown.
This is a result of the following code in productdetail.ftl
{code}
<#assign commentEnable = Static["org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("order", "order.item.comment.enable", delegator)>
<#if commentEnable.equals("Y")>
<#assign orderItemAttr = Static["org.ofbiz.entity.util.EntityUtilProperties"].getPropertyValue("order", "order.item.attr.prefix", delegator)>
${uiLabelMap.CommonComment} <input type="text" name="${orderItemAttr}comment"/>
</#if>
{code}
Based on the code excerpt this is set by a property value in the order component. However this should be based on a configuration setting in the store.
jleroux: I simply changed the place of the ProductStore.allowComment field (not after the old deprecated fields) and used a description instead of an XML comment there.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1735435 13f79535-47bb-0310-9956-ffa450edef68
================================
There are three sets of dimensions in the Product entity.
(productHeight, shippingHeight), (productWidth, shippingWidth), (productDepth, shippingDepth) but in case of weight, there is another set of dimension field weight and productWeight which are inconsistent in nature.
Fix this thing and correct all instances of this in the framework.
=================================
Thanks Suraj for reporting the issue and providing the patch for the same. Thanks Jacopo and Pierre for discussing the issue with Suraj.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1720900 13f79535-47bb-0310-9956-ffa450edef68
This is a first step to refactor application components into independent parts that can be deployed when needed.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1720413 13f79535-47bb-0310-9956-ffa450edef68