#idempiere IRC log for Tuesday, 2015-10-06

Not-5e44[IDEMPIERE] cboecking updated IDEMPIERE-281100:08
Not-5e44[IDEMPIERE] The purpose of this ticket is to create a single primary key for m_productprice. Doing so gives m_productprice the same abilities as other tables with a single primary key. These abilities include: * accepting attachments * maintaining change log * etc... There are quite a few examples of of these tables. It is my hope that this ticket provides the model for doing the same to other tables if needed. Here00:08
Not-5e44is sql to help identify these tables: select t.tablename from ad_table t where 0= (select count (*) from ad_column c where c.ad_table_id = t.ad_table_id and c.iskey = 'Y' ) and t.isview='N' and lower(t.tablename) not like '%trl' and lower(t.tablename) not like 't_%' and lower(t.tablename) not like 'm_%ma' and lower(t.tablename) not like 'm_storage%' order by lower(t.tablename); Assumptions and Findings: * When00:09
Not-5e44creating the primary key, we can use the nextID db function to assign primary key values because of the below sub-bullets (per Carlos comment below) ** the 'M_ProductPrice' tableID record in AD_Sequence already exists. ** 'Enable Native Sequence' creates a sequence for tables even when there is no column flagged as primary key. The steps are described below. You will take the results of the below steps to hand-create00:09
Not-5e44the final migration script. Section 1 Attached "primary key steps 01.sql" 1. SQL - Drop current compound primary key 2. SQL - create new column NOT!! as primary key (example: M_ProductPrice_ID) 3. SQL - create temporary sequence 4. SQL - update new column with sequence 5. SQL - make column the primary key Section 2: execute attached SQL This section will be captured in a Log Migration Script 1. Enter Dictionary00:09
Not-5e44Maintenance username and password 2. Turn on Dictionary Maintenance and Log Migration Script 3. Find M_ProductPrice 4. Enable Change Log 5. Create M_ProductPrice_ID System Element ##. set Entity Type = Dictionary 6. Create M_ProductPrice_ID ##. make mandatory ##. do not allow copy 7. Find out every tab where table used (use AD_Client_ID -> Used in Field sub-tab) 8. Add key to every WT&F using the Create Fields00:09
Not-5e44process setting the Created Since date to yesterday To run migration script in a test environment: psql -U adempiere -d idempiere -f /tmp/mig....postgres.sql Section 3: update AD_Sequence just in case the count went above the default. Section 4: Create new patch in code. * regenerate model for M_ProductPrice * Update MProductPrice.java to remove "multi-key" exception Attach patch to ticket * Update M_PriceList_Create00:09
Not-5e44to include nextId Test cases: * Test to make sure all worked as expected - set GWAdmin role to isChangeLog = y and change a product->price * make sure new record get created and updated values * make sure updated records get correct details (updated and updatedby) * make sure records that existed before this change act correctly. * create a run Price Schema pass to make sure all works as expected * upgrade an00:09
Not-5e44existing system that is configured to use native sequences00:09
Not-5e44[IDEMPIERE] http://idempiere.atlassian.net/browse/IDEMPIERE-281100:09
Not-5e44[IDEMPIERE] cboecking updated IDEMPIERE-281100:11
Not-5e44[IDEMPIERE] The purpose of this ticket is to create a single primary key for m_productprice. Doing so gives m_productprice the same abilities as other tables with a single primary key. These abilities include: * accepting attachments * maintaining change log * etc... There are quite a few examples of of these tables. It is my hope that this ticket provides the model for doing the same to other tables if needed. Here00:11
Not-5e44is sql to help identify these tables: select t.tablename from ad_table t where 0= (select count (*) from ad_column c where c.ad_table_id = t.ad_table_id and c.iskey = 'Y' ) and t.isview='N' and lower(t.tablename) not like '%trl' and lower(t.tablename) not like 't_%' and lower(t.tablename) not like 'm_%ma' and lower(t.tablename) not like 'm_storage%' order by lower(t.tablename); Assumptions and Findings: * When00:11
Not-5e44creating the primary key, we can use the nextID db function to assign primary key values because of the below sub-bullets (per Carlos comment below) ** the 'M_ProductPrice' tableID record in AD_Sequence already exists. ** 'Enable Native Sequence' creates a sequence for tables even when there is no column flagged as primary key. The steps are described below. You will take the results of the below steps to hand-create00:11
Not-5e44the final migration script. Section 1 Attached "primary key steps 01.sql" # SQL - Drop current compound primary key # SQL - create new column NOT!! as primary key (example: M_ProductPrice_ID) # SQL - update new column with nextID # SQL - make column the primary key Section 2: execute attached SQL This section will be captured in a Log Migration Script 1. Enter Dictionary Maintenance username and password 2. Turn on00:11
Not-5e44Dictionary Maintenance and Log Migration Script 3. Find M_ProductPrice 4. Enable Change Log 5. Create M_ProductPrice_ID System Element ##. set Entity Type = Dictionary 6. Create M_ProductPrice_ID ##. make mandatory ##. do not allow copy 7. Find out every tab where table used (use AD_Client_ID -> Used in Field sub-tab) 8. Add key to every WT&F using the Create Fields process setting the Created Since date to yesterday00:11
Not-5e44To run migration script in a test environment: psql -U adempiere -d idempiere -f /tmp/mig....postgres.sql Section 4: Create new patch in code. * regenerate model for M_ProductPrice * Update MProductPrice.java to remove "multi-key" exception Attach patch to ticket * Update M_PriceList_Create to include nextId Test cases: * Test to make sure all worked as expected - set GWAdmin role to isChangeLog = y and change a00:11
Not-5e44product->price * make sure new record get created and updated values * make sure updated records get correct details (updated and updatedby) * make sure records that existed before this change act correctly. * create a run Price Schema pass to make sure all works as expected * upgrade an existing system that is configured to use native sequences00:11
Not-5e44[IDEMPIERE] http://idempiere.atlassian.net/browse/IDEMPIERE-281100:11
Not-5e44[IDEMPIERE] cboecking updated IDEMPIERE-2811 Attachment set to "None"00:11
Not-5e44[IDEMPIERE] http://idempiere.atlassian.net/browse/IDEMPIERE-281100:11
*** ChuckBoecking has quit IRC00:31
*** ChuckBoecking has joined #idempiere00:32
Not-5e44[IDEMPIERE] cboecking updated IDEMPIERE-2811 Attachment set to "primary key steps V2.sql"00:32
Not-5e44[IDEMPIERE] http://idempiere.atlassian.net/browse/IDEMPIERE-281100:32
Not-5e44[IDEMPIERE] cboecking updated IDEMPIERE-2811 Attachment set to "None"00:33
Not-5e44[IDEMPIERE] http://idempiere.atlassian.net/browse/IDEMPIERE-281100:33
*** ChuckBoecking has quit IRC00:38
Not-5e44[iDempiereDaily] jenkins built #459 completed (success) http://ci.idempiere.org/job/iDempiereDaily/459/03:11
*** a42niem has joined #idempiere06:01
*** mbozem has joined #idempiere06:08
*** nmicoud has joined #idempiere06:17
*** xapiens___ has joined #idempiere06:35
*** xapiens_ has quit IRC06:37
*** KermitTheFragger has joined #idempiere06:37
Not-5e44[IDEMPIERE] norbert.bede created IDEMPIERE-2879 Attachment name not using printformat translation based user login language07:33
Not-5e44[IDEMPIERE] http://idempiere.atlassian.net/browse/IDEMPIERE-287907:33
*** tsvikruha has joined #idempiere07:37
*** mbozem has quit IRC07:37
*** norbertbede has joined #idempiere07:41
norbertbedehi Nmicoud07:42
nmicoudHi07:42
norbertbedeneed a bit advice to mail templates again07:42
norbertbededo you have a bit time ?07:43
nmicoudyes07:43
norbertbedeQuestion 1. https://idempiere.atlassian.net/browse/IDEMPIERE-287907:43
norbertbedewdyt ? is it my miss or real issue.07:43
nmicoudyou want to send them as a backgound task ?07:44
norbertbedeno. in this case simple print to preview then click to send mail07:44
nmicoudAFAIK, when you preview an invoice/order, it is the bpartner language which is used07:45
nmicoudso, it will be displayed in the correct language07:45
norbertbedeok but if not specific langiuage then client language could be applied07:45
nmicoudbut for other print formats, y ou would need to change it when sending the email (i mean regenerating the report)07:45
nmicoudi think it's the case07:46
norbertbedeprint format language is OK, only attachment name is wrong07:46
nmicoudah sorry07:46
nmicouddidn't read well07:46
norbertbedeso i see my printed document in slovak language but if i click to email then attachment in english07:47
norbertbedeok07:47
nmicoudyou send it from the 'standard' report panel ?07:47
norbertbedeyes07:47
nmicoudit is the name of the report which is taken, not the translated one07:47
nmicoudsee ZkReportViewer.cmd_sendMail()07:48
nmicoudaround line 82107:48
Not-5e44[IDEMPIERE] norbert.bede updated IDEMPIERE-2879 Attachment set to "attachemtntranslation.png"07:48
Not-5e44[IDEMPIERE] http://idempiere.atlassian.net/browse/IDEMPIERE-287907:48
norbertbedeadded a screenshot07:48
norbertbedeso needs to be fixed well07:49
nmicoudyes07:49
norbertbedeok. then we will fix it. thanks07:49
norbertbedeQuestion 207:49
norbertbedeis it possible select mail templates directly on email popup window ?07:49
nmicoudi don't think so07:49
nmicoudas mail template are set in other table07:50
Not-5e44[IDEMPIERE] norbert.bede updated IDEMPIERE-287907:50
Not-5e44[IDEMPIERE] IRC CHAT: you send it from the 'standard' report panel ? 09:45 norbertbede yes 09:45 nmicoud 09:45 it is the name of the report which is taken, not the translated one see ZkReportViewer.cmd_sendMail() around line 82107:50
nmicoudlinked to organization07:50
Not-5e44[IDEMPIERE] http://idempiere.atlassian.net/browse/IDEMPIERE-287907:50
nmicoudBut we could add a MailTemplate field on the EMailDialog07:51
norbertbedein some cases we need to select a specific template07:51
norbertbedewould be cool07:51
nmicoudBut if we do that, we should also add some flags on the R_MailText table07:51
nmicoudI mean, we shoulnd't propose some mails template (such as Reset Password or email signature)07:51
nmicoudA kind of 'OnlyForInternalUse'07:52
norbertbedei see07:52
norbertbedei will create a ticket well07:53
norbertbedefor later imrpovement07:53
norbertbedeQuestion 3. sometimes would be helpful load contact from document07:53
norbertbedee.g. want to send email to invoice contact person07:53
nmicoudyou want also a panel which give access to the bpartner / user tables ?07:54
nmicoudfrom which you would select a line (eg : Joe Block <joe.block@company.com>) and it will be added in the recipient of the email ?07:55
norbertbedebut when i click to field To: then im able to select user07:55
norbertbedeim bit confused now07:55
norbertbedefrom latest question07:55
nmicoudwhat do you mean ?07:57
norbertbedeat this moment im able select <mailto:joe.block@company.com> on email dialog07:57
norbertbedei want soon to pre populate this field based on document customer contact person07:57
norbertbedeso when user click to send email then mail template loaded automatically and customer contact will be populated to "TO" field07:58
nmicoudi see the "To" field is always equals to ""07:58
nmicoudso that would be possible to get the contact from the context of the window07:59
norbertbedeyes would be nice08:00
norbertbedemaybe improve mail template ?08:01
nmicoudfor mail template, add a flag to differenciate internal/external.  But for find the correct contact, the logic could be hardcoded or maybe it could be done in the AD_PrintForm table08:02
nmicoud(i never use this table)08:03
norbertbedeok. very interesting ideas. thanks for discussion.08:05
nmicoudyw08:06
nmicoudhope it helps :)08:06
Not-5e44[IDEMPIERE] tsvikruha updated IDEMPIERE-2879 Attachment set to "IDEMPIERE-2879.patch"08:27
Not-5e44[IDEMPIERE] http://idempiere.atlassian.net/browse/IDEMPIERE-287908:27
Not-5e44[IDEMPIERE] tsvikruha updated IDEMPIERE-2879 status set to "Peer Review Queue"08:27
Not-5e44[IDEMPIERE] http://idempiere.atlassian.net/browse/IDEMPIERE-287908:27
Not-5e44[IDEMPIERE] tsvikruha updated IDEMPIERE-2879 labels set to "+Patch"08:27
Not-5e44[IDEMPIERE] http://idempiere.atlassian.net/browse/IDEMPIERE-287908:27
Not-5e44[IDEMPIERE] tsvikruha updated IDEMPIERE-2879 assignee set to "Tomas Svikruha"08:27
Not-5e44[IDEMPIERE] http://idempiere.atlassian.net/browse/IDEMPIERE-287908:27
Not-5e44[IDEMPIERE] tsvikruha updated IDEMPIERE-287908:30
Not-5e44[IDEMPIERE] I used name of report from dropdown of reports - name of report here should be translated so we can use it in file name and subject.08:30
Not-5e44[IDEMPIERE] http://idempiere.atlassian.net/browse/IDEMPIERE-287908:30
*** norbertbede has quit IRC08:40
*** norbertbede1 has joined #idempiere08:44
*** mbozem has joined #idempiere09:04
*** KermitTheFragger has quit IRC09:18
norbertbede1nmicoud last question09:20
norbertbede1are you using BCC ?09:20
nmicoudyes09:21
norbertbede1our user wants to receive copy and identify emails was send by users from idempiere to outside world09:21
norbertbede1i have enabled bcc09:21
norbertbede1but not enough experience how users able to identify email - to whom was sent09:21
norbertbede1e.g. in thunderbird09:21
nmicoudwhen enabling bcc, the current user will receive a copy in his mal box. That could be enough to identify ? I mean sender = myself09:22
nmicoudno ?09:22
nmicoudwith a rule, those mail can be moved in a special folder inside thunderbird09:22
norbertbede1we want to see the email was sent to which recipient09:23
nmicoudfrom idempiere ?09:23
norbertbede1from this bcc email in mail client09:23
norbertbede1example09:23
norbertbede1im sending from me@norbertbede.com  to nmicoud@ an email and bcc is me@norbertbede.com09:24
norbertbede1so i want to see in my mail client as me@norbertbede.com am sent to nmicoud@ an email09:24
norbertbede1probably its my luck of knowledge09:24
nmicoudi understand what you want to do09:25
nmicoudbut i have no idea :-09:25
nmicoud:(09:25
posdebcc is by definition blind, ie. only the BCC recipient sees other non-BCC recipients.09:25
nmicoudyeah09:26
nmicoudperhaps that can be done througha plugin in thundebird ?09:26
norbertbede1im installing it09:27
norbertbede1let you know09:27
nmicoudok09:27
posdeThe bcc information is NOT stored in the header for the other recipients. Nothing Thunderbird can do about it.09:27
norbertbede1ok i see09:28
norbertbede1but who was original recipient must be included09:28
norbertbede1just need to display and sort based on this in mail client09:28
posdeonly if the original recipient is you09:28
posdeIf you are the BCC recipient, you can look at the Envelope-To field.09:29
norbertbede1so you mean if reciepient is another person i cant be informat why im bccd ?09:29
norbertbede1ah09:30
norbertbede1sounds good09:30
posdenorbertbede1, if BCC: joe and BCC: mary - joe only sees joe in envelope-to, and mary only sees mary in envelope-to09:30
posdenorbertbede1, mary's mail message code does not contain any mentioning of joe, and vice versa.09:32
posdeIf the mail contains a TO: jake, all three see jake, but jake doesn't see any mary or joe.09:32
norbertbede1posde do you understand what is my goal ?09:34
norbertbede1to see original to receipients09:34
norbertbede1it is new for me09:35
posdenorbertbede1, I think I am, and I am merely stating, that with BCC I doubt that you will have success.09:35
posdeMost of the time BCC is a political field, ie. you send a message to someone, and BCC your boss, so you see who the ignorant is.09:36
posdeOther use can be for mass mailings, where you don't want to fill up the header space with 10s or 100s of recipient addresses09:36
posdeAnd reports fall in the later category.09:37
*** mbozem has quit IRC09:43
*** mbozem has joined #idempiere09:44
norbertbede1hm. thanks09:45
Not-5e44[IDEMPIERE] deepak updated IDEMPIERE-2579 Attachment set to "Idempiere-2579_1.patch"10:31
Not-5e44[IDEMPIERE] http://idempiere.atlassian.net/browse/IDEMPIERE-257910:31
Not-5e44[IDEMPIERE] deepak updated IDEMPIERE-2579 assignee set to "Carlos Antonio Ruiz Gomez"10:32
Not-5e44[IDEMPIERE] Carlos, Please note that attached updated patch Idempiere-2579_1 with all changes. This also contain changes you suggested in your code review.10:32
Not-5e44[IDEMPIERE] http://idempiere.atlassian.net/browse/IDEMPIERE-257910:32
Not-5e44[IDEMPIERE] deepak updated IDEMPIERE-2579 status set to "Peer Review Queue"10:46
Not-5e44[IDEMPIERE] http://idempiere.atlassian.net/browse/IDEMPIERE-257910:46
Not-5e44[IDEMPIERE] deepak updated IDEMPIERE-2579 Attachment set to "None"10:52
Not-5e44[IDEMPIERE] http://idempiere.atlassian.net/browse/IDEMPIERE-257910:52
Not-5e44[IDEMPIERE] deepak updated IDEMPIERE-2579 Attachment set to "Idempiere-2579_1.patch"10:53
Not-5e44[IDEMPIERE] http://idempiere.atlassian.net/browse/IDEMPIERE-257910:53
Not-5e44[IDEMPIERE] MZI updated IDEMPIERE-286710:53
Not-5e44[IDEMPIERE] Thank you [~carlosruiz_globalqss] for workaround. I tested it on demo server and we have realized , the problem was caused by our new re-activation function on Bank Statement .10:53
Not-5e44[IDEMPIERE] http://idempiere.atlassian.net/browse/IDEMPIERE-286710:53
*** mbozem has quit IRC11:03
*** norbertbede1 has quit IRC11:04
*** norbertbede1 has joined #idempiere11:23
*** norbertbede1 has quit IRC11:27
*** ChuckBoecking has joined #idempiere12:23
Not-5e44[IDEMPIERE] tsvikruha updated IDEMPIERE-229612:43
Not-5e44[IDEMPIERE] Today we faced problem when SQL default logic was not applied to process parameters. We needed to add sys config *ZK_SEQ_DEFAULT_VALUE_PANEL* for to value *"623"* to support old behaviour. I suggest to change this value also in code on line 582. *"62"* is not enough as default behaviour.12:43
Not-5e44[IDEMPIERE] http://idempiere.atlassian.net/browse/IDEMPIERE-229612:43
Not-5e44[IDEMPIERE] cboecking updated IDEMPIERE-281112:45
Not-5e44[IDEMPIERE] The purpose of this ticket is to create a single primary key for M_ProductPrice. M_ProductPrice is an example of a link table that connects two other tables where the intersection includes attributes such as pricing. Traditionally, link tables do not have a single primary key. Instead, their key is the unique combination of the table IDs they connect. In iDempiere, it makes sense to give a link table a12:45
Not-5e44single primary key. Doing so gives M_ProductPrice the same abilities as other tables with a single primary key. These additional abilities include: * Accepting attachments * Maintaining change log * Audit log * Chat * Requests Since most link tables will not allow duplicates, you will typically create a unique constraint on the connecting foreign keys in addition to creating the primary key There are quite a few12:45
Not-5e44examples of of these tables. It is my hope that this ticket provides the model for doing the same to other tables if needed. Here is sql to help identify these tables: select t.tablename from ad_table t where 0= (select count (*) from ad_column c where c.ad_table_id = t.ad_table_id and c.iskey = 'Y' ) and t.isview='N' and lower(t.tablename) not like '%trl' and lower(t.tablename) not like 't_%' and lower(t.tablename)12:45
Not-5e44not like 'm_%ma' and lower(t.tablename) not like 'm_storage%' order by lower(t.tablename); The most obvious next tables to change for me include: * M_Cost * AD_User_Roles * Access tables (AD_Window_Access, AD_Task_Access, etc...) Assumptions and Findings: * When creating the primary key, we can use the nextID db function to assign primary key values because of the below sub-bullets (per Carlos comment below) ** the12:45
Not-5e44'M_ProductPrice' tableID record in AD_Sequence already exists. ** 'Enable Native Sequence' creates a sequence for tables even when there is no column flagged as primary key. The steps are described below. You will take the results of the below steps to hand-create the final migration script. Section 1 Attached "primary key steps 01.sql" # SQL - Drop current compound primary key # SQL - create new column NOT!! as12:45
Not-5e44primary key (example: M_ProductPrice_ID) # SQL - update new column with nextID # SQL - make column the primary key Section 2: execute attached SQL This section will be captured in a Log Migration Script 1. Enter Dictionary Maintenance username and password 2. Turn on Dictionary Maintenance and Log Migration Script 3. Find M_ProductPrice 4. Enable Change Log 5. Create M_ProductPrice_ID System Element ##. set Entity12:45
Not-5e44Type = Dictionary 6. Create M_ProductPrice_ID ##. make mandatory ##. do not allow copy 7. Find out every tab where table used (use AD_Client_ID -> Used in Field sub-tab) 8. Add key to every WT&F using the Create Fields process setting the Created Since date to yesterday To run migration script in a test environment: psql -U adempiere -d idempiere -f /tmp/mig....postgres.sql Section 4: Create new patch in code. *12:45
Not-5e44regenerate model for M_ProductPrice * Update MProductPrice.java to remove "multi-key" exception Attach patch to ticket * Update M_PriceList_Create to include nextId Test cases: * Test to make sure all worked as expected - set GWAdmin role to isChangeLog = y and change a product->price * make sure new record get created and updated values * make sure updated records get correct details (updated and updatedby) * make12:45
Not-5e44sure records that existed before this change act correctly. * create a run Price Schema pass to make sure all works as expected * upgrade an existing system that is configured to use native sequences12:45
Not-5e44[IDEMPIERE] http://idempiere.atlassian.net/browse/IDEMPIERE-281112:45
Not-5e44[IDEMPIERE] cboecking updated IDEMPIERE-2811 Attachment set to "None"12:49
Not-5e44[IDEMPIERE] http://idempiere.atlassian.net/browse/IDEMPIERE-281112:49
Not-5e44[IDEMPIERE] cboecking updated IDEMPIERE-2811 Attachment set to "None"12:49
Not-5e44[IDEMPIERE] http://idempiere.atlassian.net/browse/IDEMPIERE-281112:49
Not-5e44[IDEMPIERE] cboecking updated IDEMPIERE-2811 Attachment set to "migration_script_3151061084331536589_oracle.sql"12:49
Not-5e44[IDEMPIERE] http://idempiere.atlassian.net/browse/IDEMPIERE-281112:49
*** tsvikruha has left #idempiere12:51
Not-5e44[IDEMPIERE] cboecking updated IDEMPIERE-281112:54
Not-5e44[IDEMPIERE] Hi Carlos, Thank you for the feedback. I updated the migration scripts to remove the ad_treenode references. I updated the SQL to reflect your advice. Will you please test the "Primary Key Steps V2.sql" on an oracle machine to make sure the syntax does not throw an error? After you give the thumbs up on the oracle syntax, I will copy "Primary Key Steps V2.sql" into each of the migrations files, and12:54
Not-5e44perform on last round of testing on a new system to ensure the patch and scripts work as expected. Thanks, Chuck12:54
Not-5e44[IDEMPIERE] http://idempiere.atlassian.net/browse/IDEMPIERE-281112:54
Not-5e44[IDEMPIERE] cboecking updated IDEMPIERE-281112:56
Not-5e44[IDEMPIERE] The purpose of this ticket is to create a single primary key for M_ProductPrice. M_ProductPrice is an example of a link table that connects two other tables where the intersection includes attributes such as pricing. Traditionally, link tables do not have a single primary key. Instead, their key is the unique combination of the table IDs they connect. In iDempiere, it makes sense to give a link table a12:56
Not-5e44single primary key. Doing so gives M_ProductPrice the same abilities as other tables with a single primary key. These additional abilities include: * Accepting attachments * Maintaining change log * Audit log * Chat * Requests Since most link tables will not allow duplicates, you will typically create a unique constraint on the connecting foreign keys in addition to creating the primary key There are quite a few12:56
Not-5e44examples of of these tables. It is my hope that this ticket provides the model for doing the same to other tables if needed. Here is sql to help identify these tables: select t.tablename from ad_table t where 0= (select count (*) from ad_column c where c.ad_table_id = t.ad_table_id and c.iskey = 'Y' ) and t.isview='N' and lower(t.tablename) not like '%trl' and lower(t.tablename) not like 't_%' and lower(t.tablename)12:56
Not-5e44not like 'm_%ma' and lower(t.tablename) not like 'm_storage%' order by lower(t.tablename); The most obvious next tables to change for me include: * M_Cost * AD_User_Roles * Access tables (AD_Window_Access, AD_Task_Access, etc...) Assumptions and Findings: * When creating the primary key, we can use the nextID db function to assign primary key values because of the below sub-bullets (per Carlos comment below) ** the12:56
Not-5e44'M_ProductPrice' tableID record in AD_Sequence already exists. ** 'Enable Native Sequence' creates a sequence for tables even when there is no column flagged as primary key. The steps are described below. You will take the results of the below steps to hand-create the final migration script. Section 1 Attached "primary key steps 01.sql" # SQL - Drop current compound primary key # SQL - create new column NOT!! as12:56
Not-5e44primary key (example: M_ProductPrice_ID) # SQL - update new column with nextID # SQL - make column the primary key Section 2: execute attached SQL This section will be captured in a Log Migration Script 1. Enter Dictionary Maintenance username and password 2. Turn on Dictionary Maintenance and Log Migration Script 3. Find M_ProductPrice 4. Enable Change Log 5. Create M_ProductPrice_ID System Element ##. set Entity12:56
Not-5e44Type = Dictionary 6. Create M_ProductPrice_ID ##. make mandatory ##. do not allow copy 7. Find out every tab where table used (use AD_Client_ID -> Used in Field sub-tab) 8. Add key to every WT&F using the Create Fields process setting the Created Since date to yesterday To run migration script in a test environment: psql -U adempiere -d idempiere -f /tmp/mig....postgres.sql Section 3: Create new patch in code. *12:56
Not-5e44regenerate model for M_ProductPrice * Update MProductPrice.java to remove "multi-key" exception Attach patch to ticket * Update M_PriceList_Create to include nextId Test cases: * Test to make sure all worked as expected - set GWAdmin role to isChangeLog = y and change a product->price * make sure new record get created and updated values * make sure updated records get correct details (updated and updatedby) * make12:56
Not-5e44sure records that existed before this change act correctly. * create a run Price Schema pass to make sure all works as expected * upgrade an existing system that is configured to use native sequences12:56
Not-5e44[IDEMPIERE] http://idempiere.atlassian.net/browse/IDEMPIERE-281112:56
Not-5e44[IDEMPIERE] cboecking updated IDEMPIERE-281112:58
Not-5e44[IDEMPIERE] The purpose of this ticket is to create a single primary key for M_ProductPrice. M_ProductPrice is an example of a link table that connects two other tables where the intersection includes attributes such as pricing. Traditionally, link tables do not have a single primary key. Instead, their key is the unique combination of the table IDs they connect. In iDempiere, it makes sense to give a link table a12:58
Not-5e44single primary key. Doing so gives M_ProductPrice the same abilities as other tables with a single primary key. These additional abilities include: * Accepting attachments * Maintaining change log * Audit log * Chat * Requests Since most link tables will not allow duplicates, you will typically create a unique constraint on the connecting foreign keys in addition to creating the primary key There are quite a few12:58
Not-5e44examples of of these tables. It is my hope that this ticket provides the model for doing the same to other tables if needed. Here is sql to help identify these tables: select t.tablename from ad_table t where 0= (select count (*) from ad_column c where c.ad_table_id = t.ad_table_id and c.iskey = 'Y' ) and t.isview='N' and lower(t.tablename) not like '%trl' and lower(t.tablename) not like 't_%' and lower(t.tablename)12:58
Not-5e44not like 'm_%ma' and lower(t.tablename) not like 'm_storage%' order by lower(t.tablename); The most obvious next tables to change for me include: * M_Cost * AD_User_Roles * Access tables (AD_Window_Access, AD_Task_Access, etc...) Assumptions and Findings: * When creating the primary key, we can use the nextID db function to assign primary key values because of the below sub-bullets (per Carlos comment below) ** the12:58
Not-5e44'M_ProductPrice' tableID record in AD_Sequence already exists. ** 'Enable Native Sequence' creates a sequence for tables even when there is no column flagged as primary key. The steps are described below. You will take the results of the below steps to hand-create the final migration script. Section 1 Attached "primary key steps 01.sql" # SQL - Drop current compound primary key # SQL - create new column NOT!! as12:58
Not-5e44primary key (example: M_ProductPrice_ID) # SQL - update new column with nextID # SQL - make column the primary key Section 2: execute attached SQL This section will be captured in a Log Migration Script # Enter Dictionary Maintenance username and password # Turn on Dictionary Maintenance and Log Migration Script # Find M_ProductPrice # Enable Change Log # Create M_ProductPrice_ID System Element ## set Entity Type =12:58
Not-5e44Dictionary # Create M_ProductPrice_ID ## make mandatory ## do not allow copy # Find out every tab where table used (use AD_Client_ID -> Used in Field sub-tab) # Add key to every WT&F using the Create Fields process setting the Created Since date to yesterday To run migration script in a test environment: psql -U adempiere -d idempiere -f /tmp/mig....postgres.sql Section 3: Create new patch in code. * regenerate model12:58
Not-5e44for M_ProductPrice * Update MProductPrice.java to remove "multi-key" exception Attach patch to ticket * Update M_PriceList_Create to include nextId Test cases: * Test to make sure all worked as expected - set GWAdmin role to isChangeLog = y and change a product->price * make sure new record get created and updated values * make sure updated records get correct details (updated and updatedby) * make sure records that12:58
Not-5e44existed before this change act correctly. * create a run Price Schema pass to make sure all works as expected * upgrade an existing system that is configured to use native sequences12:58
Not-5e44[IDEMPIERE] http://idempiere.atlassian.net/browse/IDEMPIERE-281112:58
*** posde has quit IRC13:14
*** posde has joined #idempiere13:33
*** mbozem has joined #idempiere13:41
*** posde has quit IRC13:42
*** posde has joined #idempiere13:44
Not-5e44[IDEMPIERE] hieplq updated IDEMPIERE-229613:46
Not-5e44[IDEMPIERE] Hi [~tsvikruha], now it can configuration, so let implement decide it. default value of system for process parameter and infoWindow parameter follow old logic of parameter in infoWindow, it don't use type and database default value. i think it's acceptable.13:46
Not-5e44[IDEMPIERE] http://idempiere.atlassian.net/browse/IDEMPIERE-229613:46
Not-5e44[IDEMPIERE] tsvikruha updated IDEMPIERE-229613:55
Not-5e44[IDEMPIERE] [~hieplq] I mean default logic from process parameter like @SQL=SELECT.... is not considering now which breaks old logic.. Also I understand that it's possible to set sys config, but we should never break old logic of system :)13:55
Not-5e44[IDEMPIERE] http://idempiere.atlassian.net/browse/IDEMPIERE-229613:55
*** ChuckBoecking has quit IRC14:30
*** mbozem has quit IRC14:35
*** ChuckBoecking has joined #idempiere14:44
*** nmicoud has quit IRC16:03
*** nmicoud has joined #idempiere17:46
Not-5e44[IDEMPIERE] jgarcia updated IDEMPIERE-2869 Attachment set to "ChargeWithtaxes.patch"17:47
Not-5e44[IDEMPIERE] http://idempiere.atlassian.net/browse/IDEMPIERE-286917:47
Not-5e44[IDEMPIERE] jgarcia updated IDEMPIERE-286917:48
Not-5e44[IDEMPIERE] [^ChargeWithtaxes.patch] Attached You will find the pacth file with the changes.17:48
Not-5e44[IDEMPIERE] http://idempiere.atlassian.net/browse/IDEMPIERE-286917:48
*** nmicoud has quit IRC18:46
*** mbozem has joined #idempiere19:12
*** mbozem has quit IRC20:01
*** a42niem has quit IRC21:59

Generated by irclog2html.py 2.14.0 by Marius Gedminas - find it at mg.pov.lt!