The purpose of this page is to archive previously recorded videos. If you are new to the class and you want to review previous discussions. Start from the bottom of the archive page (first recording) and work your way up.
0:04:00 Add the product's description to the Sales Order Line details
0:11:00 Change the SO Line to sum qty in addition to the Line Net
0:23:00 Discussion of recursive database functions
0:25:00 Using the aging report as a template for creating a hierarchical Project Sales Report (where you specify a parent product[s] and the code iterates through the product levels to find the actual products).
2014-12-23 AM - Open Discussion
0:00:00 URL navigation in ADempiere - how to pull code from iDempiere
0:03:00 Grid View customize column order in iDempiere - how to pull code from iDempiere
2014-12-11 AM 2 - Open Discussion 2
This discussion provides the roadmap for how an IT professional can get up to speed as quick as possible.
0:00:00 What about changing the costing method / level / type, when some product have already been created ? Is there a need to recreate these costing records for the already created products ?
0:13:00 Could you explain the usage of costing type (currently only default is available)
0:16:00 Regarding Video: Product – Cost Sub-Tab – Fields Explained, if I remember correctly, Libero as plugin works at the moment only with swing client. Is there any update about using libero as plugin in Web UI ?
0:32:30 Month Close Process discussion
Scripts from the above discussion
Creating cost records for new cost type where 1000003 is the ID of the new cost type:
insert into m_cost
select ad_client_id, ad_org_id, ..., 1000003, generate_uuid() from m_cost
;
Creating cost records for different orgs to support Cost Level = "Organization":
insert into m_cost
select c.ad_client_id, o.ad_org_id, ..., generate_uuid()
from m_cost c
join ad_org o on c.ad_client_id = o.ad_client_id and o.isactive = 'Y'
;
0:16:00 Discussion about old Manufacturing Orders that were completed but not closed
2014-12-02 - PM Open Discussion
Creating code tied to a doc action - automatically create a payment batch line when a AR Receipt (Payment) is completed.
Options to accomplish this task: Model Validator and Table Script Validator
0:03:15 Table Script Validator
0:08:00 Rule - way to create code in the application dictionary (without creating a plugin) - Example
0:18:15 - If you are going to be an iDempiere integrator, how to manage different code bases for your different customers (in terms of both Mercurial and Jenkins build server).
0:27:30 Is it worth setting up a development environment in windows?
2014-11-20 PM Open Discussion
0:00:00 Creating the most lean path through a warehouse for pick. Use voice-driven batch pick - system needs to tell the voice pick what is the next pick group. Within the pick group, what is the order or locators I must visit given my current location/postion.
This includes discussion of how to best communication with iDempiere - web services and/or directly sql
0:10:30 discussion of Linux privileges relating to your user and the idempiere system user
0:16:30 modifying the import business processor to include include importing Business Partner => Bank Account. Option 1 Import Validator. Option 2, use SQL after the records have been imported.
insert into c_bp_bank_acct (a, b, c) select a, b, c from i_bpartner
2014-11-20 AM - Open Discussion
0:00:00 How to implement "prevent or disallow negative inventory in ADempiere" also how to implement the same in iDempiere at the locator level.
0:11:45 Confirm in iDempiere the "prevent or disallow negative inventory" only works at the warehouse (not locator)
0:12:30 Tangent discuss about SSL between (a) the user and app server and (b) the app server and the database
0:14:00 Tangent Options for encrypting and securing iDempiere using PFSense (firewall)
0:18:00 Tangent Bandwidth discussion - how many concurrent users can a T1 data pipe support
0:19:45 Back to iDempiere, Warehouse and preventing negative inventory
0:21:30 Enhancing the RMA process to better isolate Non-Conforming Material (NCM)
problem is that the Customer Return and the Vendor Return uses the same locator as the original shipment/receipt. This issue mixes good product with non-conforming material.
Demonstrate how to solve this issue with a little bit of code.
0:36:15 Same RMA discussion using a separate warehouse instead of a separate locator. This is actually better because you can better hide non-conforming material from the generate shipment process.
0:42:00 Using CSV and 2Pack (pack out and pack in) - Note: we did not achieve success in the video. Instead, I created a post with the correct details.
0:48:30 Discussion about the changes to the installation script to support apache running as a reverse proxy to protect tomcat
Sample code from "prevent or disallow negative inventory" discussion above:
Model Validator (chuckSteakValidator)
BeforeCompleteIt()
{
if issotrx = Y
//from the header perspective
select m_product_id, m_locator_id, m_attributesetinstance_id , sum(iol.movementqty)
from m_inoutline iol
where iol.movementqty >
(select sum(qtyonhand)
from m_storage
where m_product_id = iol.m_product_id
and m_locator_id = iol.m_locator_id
and m_attributesetinstance_id = iol.m_attributesetinstance_id
)
and iol.m_inout_id = ?
group by m_product_id, m_locator_id, m_attributesetinstance_id
}
If the abvoe query returns a result, then
return "Product = , Locator = , ASI = brings the quantity on hand below zero"
2014-11-18 PM Open Discussion
0:00:00 Attachment discussion
0:01:30 Why you should store you attachments in your filesystem - not your database
0:03:45 A quick (and somewhat dirty) way to make all your attachments for a given document to the user via a web browser.
0:05:00 how to store your attachments to your file system instead of your database. Note: database is the default.
0:19:30 How to use mercurial to keep file/attachment version histories - prevents the permanent deletion of a file.
0:24:30 Adding a Product "Used Where" subtab to help you see everywhere a product is used. For example, how to see a raw good's BOM usage/parents.
0:26:30 Managing large customers like Intel where they have separate operations in multiple states. Discuss open balances and Partner Relations records to link different BPs to the same invoice location.
0:28:15 Demonstrate Partner Relation
0:33:15 Back to document management - Alfresco and Exo
0:36:00 Using the iDempiere URL field to map a local directory where attachments are held. Note: this needs fixing from a developer.
0:40:00 Home page Dashboard, KPI, cockpit, graphing options
0:52:30 mapping RFID tags to product attributes
0:54:30 create a new product with instance attributes (attribute set instance ASI)
2014-11-18 AM - Open Discussion
0:00:00 How to split a specific lot (attribute set instance) into multiple lots and assign different costs. This is common when you differentiate your products based on quality. Say you have Qty=100 in a receipt. In the receipt, you determine that 60 are of high quality and 40 are of medium quality. This is a great discussion!!!!
0:06:00 Overview of the two ways to split lots (Production and Physical Inventory)
0:15:45 Advantages/Disadvantages of Production vs Physical Inventory
0:29:15 European Accounting document update - feedback from Han's friend
0:44:15 Why and how the 2.1 migration did not go smoothly - how I fixed the issue. This is worth a quick review.
0:50:00 Why you should consider upgrading to a new server when you upgrade to a new version - best practices in disaster recovery.
0:53:00 iDempiere security - securing idempiereEnv.properties - should you use SSL between your app server and database
0:58:30 Using apache to protect tomcat
2014-11-13 PM - Open Discussion
Installing the Slow Moving Inventory report
0:02:15 Create Alert and Alert Processor to email the report to a user on a periodic basis
0:08:00 Explore using scheduler and workflow to email a report - was not successful during video
0:14:45 Using a process to send a periodic report via email - did not finish - went on tangent
Quick process introduction
0:17:30 Discussion about iDempiere's documentation - why so little documentation exists.
0:24:30 Relationship between Product, Replenishment, and automated Purchase Order creation
0:27:00 Replenish Report
0:27:45 Generate PO from Sales Order
0:31:00 Adding a price beautifier (making price list version prices prettier). An example includes, changing a resulting price from $4.09 to $3.99 or $4.25)
2014-11-13 AM - Open Discussion
Update on 2.1 Upgrade
0:02:30 Should you virtualize (via ViritualBox or ESXi/VMWare) when you are running on an Ubuntu server
0:04:30 Dave's Price List question - mapping a current customer's needs to the current iDempiere Price List or discount abilities.
0:47:15 Sandy's question about Outsourced Manufacturing column naming convention
0:57:00 New view => name column is showing an error for stating "too many characters are entered"
0:65:00 Creating a Column SQL on the Product window
(select sum(s.qtyonhand) from m_storage s where m_product.m_product_id = s.m_product_id)
2014-11-11 PM - Open Discussion
0:00:00 Take a SQL query and expose it as a Window
0:02:45 How to add created, createdby, updated, updatedby to a view where you cannot derive it from the existing data
0:05:00 Import the SQL view as an iDempiere Table and Column (Table & Column)
0:09:15 Expose the SQL view through a Window Tab and Field. This is a great technique to make your reports more interactive.
0:13:15 Add the window to your Menu
0:13:45 View the new report in your window
0:15:45 Adding a where clause to the Tab to limit records based on business logic
0:19:30 Adding subtabs with graphs to visualize data
0:21:00 Exporting your window and SQL so that someone else can have the same report
0:24:45 POS Tangent
0:31:15 Resume pack out of report
0:33:00 Take the report pack out (2pack) and pack in into a new environment
0:34:45 Deeper discussion about how to reporting with parameters
0:36:00 Product Category Tangent
0:39:30 Back to reporting with parameters
0:40:35 Using Alerts to send xls based report via email on a schedule
0:42:45 Using the slow moving stock report to optimize inventory movement
0:43:30 Warehouse visibility Tangent
0:46:00 Inventory Move between organization's interCo accounting consequences
2014-11-11 AM - Open Discussion
2.1 upgrade issue - Chuck has the action
0:01:30 common settings and plugins for wholesale distribution
0:04:00 discussion about product attributes for wholesale distribution (instance vs product attributes)
0:11:00 Discount structure discussion - relationship between Price List, Discount Schema, Promotions, and custom enhancements
0:17:45 Business Partner segmentation - how to tag and report on Business Partners by attributes
0:20:00 Discussion about VAT (value added) tax
0:27:00 Importing images for Products discussion
0:30:45 Downloading currencies from a bank
0:34:30 Managing a B2B webstore/tool with iDempiere
0:41:30 Copy/Export Role to move between environments
0:51:00 Business Intelligence BI reporting options (spago, pentaho, jasper server, jasper from iDempiere)
0:54:00 Localization discussion
0:64:00 Table and Column discussion - naming conventions for new columns (outsourced production design)
0:74:00 Demonstrate Pack Out and Pack In (2pack) to move new columns from one system to another
2014-11-06 PM Open Discussion - Update RV_Storage to Include Sales and Replenish Data
This videos walks you through the process up extending RV_Storage (Storage Detail Report) to include sales and replenish data. This video is quite long because it brings you through the entire thought process including trial and error on SQL query. The query was created with phppgadmin.
2014-11-06 PM Open Discussion - Intro European Accounting
2014-11-06 Daily Banking Discussion
Introduction and review of the Daily Banking window
0:03:00 What does it mean to be cleared?
0:06:45 Would be nice if process graphed expected cash over 30 days based on drafted payments
0:11:15 Demonstration of moving a payment from Completed (Not Cleared) to Completed on Drafted Bank Statement Line (Yes Cleared) to Completed and on a Completed Bank Statement (Reconciled)
0:14:00 Example of how someone would manually draft bank statements on a daily basis. This is usually a 5 to 10 minutes process.
0:21:00 ADempiere upgrade from 3.6 to 3.7 gives a Libero Calculate Material Plan error where Manufacturing Order deletion gives a SQL error. Not able to solve.
2014-10-28 PM - Open Discussion
Connecting a R&D Project to a product
0:04:00 Process to convert a Project into an Asset
0:06:00 How to track BOM version
0:13:30 How to track different product design drawing versions over time
0:18:00 Discussion about cost roll up in Libero
0:24:00 Print Invoice (mass process) bug - details about applying a patch
0:25:00 Does '*' mean anyone can see - Answer = No
0:27:00 How to see and deploy your patched code. (0:31:00 found the right video demonstration)
0:34:00 Using the chuboe_utils/chuboe_idempiere_upgrade.sh to upgrade your production instance from your new p2 build
2014-10-23 PM - Open Discussion
Comparing QuickBooks and iDempiere
0:02:45 Improving the data entry experience with iDempiere
0:05:00 Data entry in iDempiere - lots of fields and lots of power
0:06:30 Editing the Order Line and GL Journal without leaving the header (grid view)
2014-10-23 AM - Open Discussion
Material Receipt Confirmation - Confirmation Type
0:02:00 Review code for MInOutConfirm => ConfirmType - how used - answer: determines how MInOut lines are updated (MInOutLineConfirm.processLine: 116)
0:07:15 "Split when Difference" (isSplitWhenDifference)
0:11:30 MInOutConfirm.splitInOut method to create a new document with similar lines
0:17:00 Summary of Split functionality
0:21:30 Create an example of Split functionality
0:23:00 Tangent Discussion about how to best set the Document Type based on business logic
0:28:30 Scrapped Quantity (Scrapped Qty) - Create Credit Memo and Physical Inventory for scrapped qty
0:30:00 Scrapped Quantity Example
0:40:15 Product window => Purchasing tab => What is the reason for pricing on this tab (as opposed to using price list)
0:42:00 Define price of Product based on UOM. Wish to not use the UOM conversion math.
2014-10-21 Landed Costing Review and Standard Costing
Introduction
0:01:00 Question from Dave - landing against multiple MR lines with potentially multiple lot/serial for a given product
0:05:00 Show example with Landed Cost against a MR with multiple lines
0:07:30 Live example of landing a cost where the original vendor is charging freight
Note this scenario illustrates a bug
0:15:00 - Result - the system should not have posted the the Average Cost Variance - instead it should have increased inventory an changed my cost to $2 (from $1)
0:21:00 - 0:26:00 Illustrate an example of how it should work using separate invoices
0:18:00 Discussion of Cost Element as it relates to Costing Method and the landing of costs.
0:26:00 Landed Costing in a system configured for Costing Method = "Standard Costing" - Demonstrated by example
0:28:00 spreadsheet estimation
0:30:45 how to get costs in a spreadsheet into the system - use the M_Cost => Future Cost field - Standard Cost Update process
0:34:00 Create new Product Category to set all Products under it to Costing Method = "Standard Costing"
0:34:45 Create new Product - note that I forgot to set the Product Category
0:35:15 Use Cost Adjustment to set the initial cost of the new product - note that I forgot to complete the Cost Adjustment
0:37:00 Create a M_Cost record for "Freight" and "Cost at Source" (non-costing method Cost Element)
0:40:30 Create a Purchase Order with the new product
0:41:00 Create the Material Receipt
0:42:45 Create the Vendor Invoice - Review Matched Invoice - note that delta between Invoice Price and Cost goes to IPV (Invoice Price Variance)
0:44:15 Create Vendor invoice for landing charge (for FedEx for example)
0:45:00 Discussion about the Magic of standard costing and IPV
0:49:00 How do defend IPV the current balance and update costs to account for future corrections
0:50:34 TANGENT - Account Element - how to structure IPV in standard costing - landed costing
0:52:15 The power of using averages when evaluating land costing
0:54:30 SQL Query to show averages across Landed Cost Allocations
0:57:30 What happens when you over or under accrue in Invoice Price Variance (IPV)
0:58:30 When updating costs based on the above analysis, look at changes to inventory valuation and future sales before making the change.
1:00:00 The need for a core code change to prevent landed cost posting (doc_invoice) when a Product Category or Accounting Schema => Costing Method = "Standard Costing"
1:05:00 do you embed the outbound shipping cost to the cost of the product?
2014-10-21 AM - Open Discussion
0:03:00 Splitting (split) PO Line from MR Line to more easily support over-receiving goods.
0:15:45 Google Docs (calendar) integration.
0:26:00 Twitter feed
0:29:00 Product => Is stocked field
0:30:00 Using the replenishment process to perform just in time deliver for product that is not normally stocked.
0:31:15 Product window is really slow to load
0:35:30 Importing costs when going live when Costing Level = Batch/Lot
Short answer - the Import Inventory has a field called Serial. Use this field to import your lots/serial (which also creates your ASIs)
2014-10-16 AM - Open Discussion
Managing Document Sequence values when manually importing records
0:07:00 Discussion about the historical Business Partner name (BP name) customization
2014-10-14 AM - Open Discussion
Payment Allocation Date - how to make sure the date is set accurately
also addresses date relationships between payment, invoice and allocation
0:18:15 Reproduce a bug where processing a Payment Allocation with a Charge leave inaccurate balance on the Business Partner => Open Balance field. (link to iDempiere post)
0:23:45 Aging report discussion
0:26:45 Consolidating multiple Sales Orders into a single Shipment. How to update the Packing Slip to better show this one to many relationship (link to example print format - see section named "Print Formats with Complicated Line Details")
0:29:30 How to turn off the "Consolidate to one Document" option for Generate Shipments (Manual)
0:39:45 Replication question
0:44:00 Financial Report => Print Format => Print Table Format record to help beautify the financials report
0:48:30 Why do I use Excel to format financials?
2014-10-09 - Batch Deposit - Payments into Batch
Introduction - how to collect multiple AR Receipts into single batch so that a user can find the applicable receipts at the time of bank statement creation.
0:01:00 Process overview
0:02:45 Create invoices
0:04:00 Create AR Receipts
0:04:45 Create Payment Into Batch Record and add Receipts
0:06:00 Create Bank Statement
0:07:00 Potential enhancements
Other enhancements
Payment needs before void/reverse logic to prevent void/reverse if payment is in a batch.
Bank Statement window needs subtab called "Bank Statement View" that (a) hides payments that are in a batch and instead shows batches as a single line. This helps users compare the iDempiere bank statement view with how the bank's statement looks.
Bank Statement window => Line subtab => add Batch field to show if the payment is part of a batch (Column SQL)
2014-10-09 AM - Open Discussion
Discussed how to upgrade (migrate of migration) your database when you did not use my script to install iDempiere.
2014-10-02 PM - Open Discussion
Adding a Sales/Purchase Order Line URL from the Product - Column SQL
0:01:45 Can you add more than one promotion to an order
0:04:00 Can you create 50+ PriceList versions simultaneously
0:12:30 Tracking and creating customer and vendor Rebates (retrospective) payments
0:23:30 Creating Charges and using them as a means to code expenses and revenue to the GL.
0:27:30 Creating special fields on Orders and Invoices to create queues for special documents to be approved before being completed.
0:33:45 Can you rebrand iDempiere as your own? If so, how.
0:35:00 Is it best to create a single POS BP can contains all/many contacts and locations, or is it better to create each customer as its own BP?
The purpose of this page is to help you get started when trying to maximize performance, diagnose issues and maintain a very fast system.
Index Performance Tuning on Like Query
https://www.postgresql.org/docs/current/pgtrgm.html
gin - fast for read (preferred for materialized view)
gist - more balanced between insert and read
Installation Script Performance Tuning
The installation script can performance tune your system depending on how your install iDempiere.
All-In-One - if you install all iDempiere components on a single server, the installation script assumes you are just testing iDempiere and makes no attempt to performance tune. Note: Java's default heap memory (XMX) is only 512MB (as observed by logging into iDempiere => Upper-Left corner => click on iDempiere logo => Info tab => Search on "heap").
Dedicated Servers - if you install iDempiere on dedicated servers (one server for DB and one for WebUI), the installation script assumes that you want to maximize performance. As a result, it will tune both the database and application (webui) server to maximize performance for that server at the time of installation. If you increase or decrease the power of your servers, you should either reinstall iDempiere on the new server or review how the script performs the optimization (Search on "xmx" and "pgconfig").
Database Quick Summary
Start here...
Also run postgresqltuner ubuntu cli application. Note that you can install it on any server (not necessarily the db server). Example usage:
There are generally three tasks associated with making PostgreSQL run faster and more efficiently:
Update PostgreSQL settings to meet your system and your business needs
Identify problems
Fix problems
Regarding #1, the best way to tune PostgreSQL for your needs is via this tool: https://www.pgconfig.org/#/tuning. Note: this tool is automatically run if you install iDempiere via my script on dedicated machines.
Regarding #2, the single best way to identify performance issues is pgbadger. There is a pgbadger installation script here. This link includes details about PostgreSQL log management as well. This is a tool that runs periodically, generates static html files and shows you what queries are consuming the most resources.
Regarding #3, fixing issues requires the most institutional knowledge. If you can perform steps 1 and 2 and you are unsure about step 3, then email the group the pgbadger results and join the Open Discussion meetings so that we can identify the culprit and fix.
Database and iDempiere Performance Tuning
Introduction - is your hardware right-sized and what modifications/changes/additions have you made that make system slower
0:02:45 high level query that tell if you are making the most of your indexes (index hit ratio)
0:05:30 high level query that tells if you are able to hold your database in memory (memory/heap/cache hit ratio)
0:07:00 index hit ratio detail - list what tables have (1) high record count and (2) how many table hits - look for low percentage values
0:10:00 pg_stat_statements view to gather statistic about queries (total time, number of executions, etc...)
0:15:00 Explain Plan a specific problem query - create an index if needed.
0:21:30 Database disk needs - dedicted drive for data - dedicated drive for WAL - benefits of using dedicated drive
0:33:15 iDempiere performance tuning
0:35:00 iDempiere best practices (columns sql, Search vs Table Direct reference, iDempiere logging)
0:49:45 max_connections - pg_stat_activity to see connections
0:55:00 shared_buffers
0:57:30 work_mem
0:59:30 maintenance_work_mem
0:60:00 checkpoint_segments and checkpoint_completion_target
1:03:15 locking contention
1:03:30 more information and references
1:06:45 JVM Xmx setting to increase the heap size limit
NOTE: the installation script uses the results of this site to tune the database when installing the database on a dedicated machine.
NOTE: run the process Enable Native Sequence to move system ID generation to the database. This option is much faster for importing high record counts.
Hans' memory comment
This error usually means that PostgreSQL's request for a shared memory segment exceeded your kernel's SHMMAX parameter. You can either reduce the request size or reconfigure the kernel with larger SHMMAX. To reduce the request size (currently 415776768 bytes), reduce PostgreSQL's shared_buffers parameter (currently 50000) and/or its max_connections parameter (currently 12).
Building a Scalable and Highly Available PostgreSQL System
For more information about performance tuning for postgreSQL applications, I highly recommend the PostgreSQL 9 High Availability Cookbook. It is worth every penny.
"Table" and "Table Direct" are very Expensive
Here is an article I published about performance tuning. In it, it explains how iDempiere's caching of drop-down fields for very large tables is very expensive. The better alternative is to use the "Search" option instead of Table or Table Direct when the target table has more than 20 records.
Here are queries that will help identify likely culprits.
SQL to show rows by table:
SELECT schemaname,relname,n_live_tup
FROM pg_stat_user_tables
ORDER BY n_live_tup DESC;
SQL to show iDempiere Columns that are either Table or Table Direct
select c.ad_column_id, c.columnname, t.tablename
from ad_column c
join ad_table t on c.ad_table_id = t.ad_table_id
where c.AD_Reference_ID in (18,19)
order by lower(t.tablename), lower(c.columnname);
Start with the columns that reference tables with the greatest row counts first. The following query shows you row count (entries):
SELECT
relname AS objectname,
relkind AS objecttype,
reltuples AS entries, pg_size_pretty(relpages::bigint*8*1024) AS size
FROM pg_class
WHERE relpages >= 8
ORDER BY entries DESC;
How to Fix
NOTES
Always test and perform a backup before executing any query against a production database
Search windows require details that Table and Table Direct lookups do not. An example is that Search reference require that the Table and Column window => Window field be not null. It uses the window to determine how the fields appear in the Search dialog.
The below SQL statements update your system according to the above details.
You can run the below statements as is needed over time. Simply update the timestamp in the below table names.
Create a backup just in case:
Create table chuboe_perfmax_columnsback_20180709 as select ad_column_id, ad_reference_id from ad_column;
Update all views to use Search instead of Table or Table Direct. The reason is that no view should ever present a user with dropdown since all fields are read only. You can run this query as often as you wish since new views will default to Table references.
update ad_column
set ad_reference_id = 30
where ad_column_id in (
select c.ad_column_id
from ad_column c
join ad_table t on c.ad_table_id = t.ad_table_id
where isview = 'Y'
and c.AD_Reference_ID in (18,19)
);
Update all CreatedBy and UpdatedBy references to Search.The reason is that no one should editing these fields.
update ad_column
set ad_reference_id = 30
where ad_column_id in (
select c.ad_column_id
from ad_column c
where c.columnname in ('CreatedBy','UpdatedBy')
and c.AD_Reference_ID in (18,19)
);
In order to update references to active and editable windows, we need to create a quick list of tables that have high record counts:
DROP TABLE IF EXISTS chuboe_perfmax_bigtables;
CREATE TABLE chuboe_perfmax_bigtables AS
SELECT
relname AS objectname, reltuples AS entries, pg_size_pretty(relpages::bigint*8*1024) AS size
FROM pg_class
WHERE reltuples >= 55
and relkind = 'r';
Extract out the TableName from the Column Name:
DROP TABLE IF EXISTS chuboe_perfmax_coltotable;
CREATE TABLE chuboe_perfmax_coltotable AS
Select
c.ad_column_id, c.columnname, coalesce(lower(rtt.tablename),lower(SUBSTR (TRIM (c.columnname), 1, LENGTH (TRIM (c.columnname)) - 3))) as tablename
from ad_column c
left outer join ad_reference r on c.ad_reference_value_id = r.ad_reference_id
left outer join AD_Ref_Table rt on rt.ad_reference_id = r.ad_reference_id
left outer join ad_table rtt on rt.ad_table_id = rtt.ad_table_id
where c.AD_Reference_ID in (18,19)
and lower(columnname) like '%_id';
Update the necessary columns. Note that I included a line about ad_val_rule_id (Dynamic Validation). The reason is that Search dialogs with Dynamic Validation that exist in a subtab might not perform as expected (see this ticket for details).
update ad_column set ad_reference_id = 30
--select columnname, ad_reference_id from ad_column
where ad_column_id in
(
select ad_column_id
from chuboe_perfmax_coltotable
where tablename in
(
select objectname from chuboe_perfmax_bigtables
)
)
and ad_val_rule_id is null
and lower(columnname) not in ('ad_org_id','user1_id','user2_id','ad_val_rule_id')
;
The following query will help you focus on creating the proper indexes. It shows you what dynamic validations exist for all remaining Table Direct and Table references.
select count(*) as count, c.columnname, r.name as DynValName, r.code as validationcode,
(select array_to_string(array(
select t.tablename
--|| coalesce('_'||(select entries from chuboe_perfmax_bigtables where lower(t.tablename) = objectname),'')
from ad_table t where t.ad_table_id in
(
select xc.ad_table_id
from ad_column xc
where xc.columnname = c.columnname
and xc.ad_val_rule_id = c.ad_val_rule_id
and xc.AD_Reference_ID in (18,19)
)
order by lower (t.tablename)
),', ')
) as RefFromTables
from ad_column c
join AD_Val_Rule r on c.ad_val_rule_id = r.ad_val_rule_id
where c.AD_Reference_ID in (18,19)
group by c.columnname, r.name, r.code, c.ad_val_rule_id
order by c.columnname;
Notes About the "Search" Reference
The search window uses Window, Tab and Field data to display data in the generic Search => Info Window. It uses the Table and Column window => Window field as the key to find this data. If the Table and Column window => Window field is empty, you will get an error.
The "Search" Reference does not take into account the tab it is called from (only the Window) as of the time of this bullet was created - see developer notes. This situation will sometimes cause issues. In these situations, it is easier to simply change the Reference back to "Table Direct" or "Table" as needed to quickly fix the issue. This one change should not greatly deter from the overall benefit.
There are subtle changes that cause issues. The above queries account for these issues. I am documenting here for future reference. For example:
the system is aggressive as setting/defaulting AD_Org_ID to 0 or "*" when the field is a search.
Search fields are capable of being set to 0 (zero) where Table and Table Direct fields use 0 (zero) as empty or null. As a result, Material Receipt window => Create Lines From process fails because the code sets the User1_ID on M_InOutLine_ID to 0 (zero) resulting in a foreign key violation because the system is trying to save a value of 0 (zero) in User1_ID at the DB level.
Run Away Locators
In a past ADempiere project, we discovered there was a bug in the locator lookup field. This this is iDempiere's default field type to help users find the right locators. The issue was that the locator would load every locator's model every time the locator control was used. If you had an instance with 150K locators, the server CPU would hit 100% and it would go into a non-usable state for about 10 minutes. I let the developers know; however, I never followed up to test if the issue was resolved.
Let me know if you think this issue is impacting you.
Configuring Streaming Synchronous Replication in PostgreSQL
Entering AP and AR Payments in batch with a controlled amount - is it possible. Same question applies for AP and AR Invoices.
0:10:00 Provide a bank statement line import process that (1) consumes your bank statement (that happens to contain your remittance), (2) creates and completes the payment along with the listed allocations and (3) adds the bank statement line (linked to the payment created in step #2). The same bank statement would be imported against on a daily basis until the end of the month. At the end of the month you complete the bank statement. At the beginning of each month you draft a new bank statement for the new month's activity.
0:18:15 Gaurav's solution where each payment creates and completes a bank statement.
0:24:00 Payment Terms due for a fixed day in the month - solution to add the day the invoice is due to the invoice - link
0:26:00 Process to generate AP and AR Payments based on what is due via aging. Payment Selection process and JIRA ticket - link
0:32:30 When going live, what is the best way to import historical invoicing so that all forecasting can come from the same system.
0:06:00 typical enhancements to the Print Invoice Process - only print non-printed invoice
0:06:30 controlling who gets what (email, print, or both) automatically
0:07:15 reprinting the last Invoice Print run
0:09:00 introducing the concept of a Print Run
0:11:00 Question about re-creating Invoices as they originally existed vs with current changes
0:12:30 Introduce the concept of archives to capture the state of a print out at that moment in time. Every time you print, it creates a snapshot copy for future reference.
0:15:00 Review the code/process
0:17:15 Dunning, Dunning Run, and Print Dunning Results
0:18:15 Review the Dunning setup window - set BPs with the correct dunning options.
0:21:00 Execute a Dunning Run
0:21:45 Execute a Print/Export Dunning Leters
0:23:30 Difference between BP window =>BP_Loc tab => tab Pay From and Invoice fields. How they matter to Dunning.
0:24:30 Review of Running Run results
0:26:30 How do you set communication preference (Notification Type) for a user? Does the Invoice Print or Dunning Print take this field into account?
2014-10-02 AM - Open Discussion
Introduction to a situation where 100+ orders were imported to the wrong warehouse. We will later in this video review how to fix.
0:04:30 review the M_StorageReservation (M_Storage in ADempiere) re-sync (sync) process to correct a situation where the M_StorageReservation QtyReserved or QtyOnOrder does not accurately reflect the OrderLine's quantity reserved (QtyReserved). Link to the iDempiere script
0:13:00 Tangent - how iDempiere should be modified to better track QtyReserved and QtyOnOrder
0:16:00 Getting back to the first bullet (where 100+ orders were imported to the wrong warehouse).
Itemize the steps needed to fix this situation for a single order (fix manually)
0:19:30 How to perform the above manual process in bulk
0:20:45 Tangent about how to handle the scenario where some orders have been shipped, invoiced and paid.
0:25:45 Resume bulk fix process
0:26:30 Note that you can temporarily use the Self-Service flag to identify the orders that need to be updated!!
0:33:00 How to create a one to many link between a given user and multiple locations
2014-09-30 AM - Open Discussion Including Simple Document Validation
Introduction to Document Validation
0:02:00 Illustrate the situation we are trying to prevent - creating an order line with no product AND no charge. It should have one or the other.
0:03:15 Discuss possible solutions - creating a view to trap that bad situation.
0:04:15 Create the first SQL statement
0:09:30 Update the user interface to show the hard fail (bad situation)
0:11:45 How to prevent users from printing until the document is in a known good state.
0:15:00 Create a C_Order column SQL (colsql) to let the order know when there is a hard fail (bad situation).
0:18:45 Add Hard Fail column to the Sales Order window (Window, Tab & Field)
0:20:00 Prevent the user from completing the order if a hard fail exists.
0:21:45 Be careful about adding column sql to a high volume or high record count table. It can slow down your system.
0:23:45 Create a view that unions (union all) all the hard fails into a single view so that we can easily check and display results to all users.
0:29:30 Add an additional check - create new view and add to union-ed list
0:38:30 Modify the views to include the line number in the problem's description
0:44:00 how to add Advanced Search windows to be able to search by line details. Add the line details to the Business Partner Info window.
0:48:15 Demonstration of how to install Advanced Search
0:51:30 How to create a zoom-able field (hyperlink) to itself - for when someone exposes a table instead of a view in a separate window - like Business Partner Info window.
0:52:30 Ora-00020 - maximum number of connections exceeded in Oracle
0:58:30 How to create programs/processes that use the least number of connections (managing transactions)
1:04:00 How to delete child rows when the parent row is deleted - use cascade delete as the type of foreign key reference in database.
2014-09-25 - Replication, Stability and Performance Tuning
Introduction - picture of success - Hot standby databases and installation directory in a separate data centers for disaster recovery and fail over.
Great question from Hans about replication topics
0:06:00 Three ways to back up a database (1) pg_dump, (2) replication, (3) WAL archives
0:08:00 Using a virtual machine snapshot backup (VMWare, Virtual Box, AWS snapshot)
0:14:30 iDempiere Production Order execution (after planning is complete)
Note: there is no concept of an Order for production - Similar to how a PO creates Material Receipts (0:17:30) . How do you create an Order concept in Production (manufacturing)
0:18:30 - how Sandy represent Labor and Overhead (what Sandy calls CMT for contract manufacturers). Used to track Not Invoiced Manufacturing costs.
0:20:30 - consider adding a Document Type to Production (Production Order and Production Receipt)
0:25:30 - how to document changes based on plan - both at the header (change of plan) and at the line (change of efficiency/scrap)
0:30:30 - use this model to Production Order 1M products and Produce X per day (use of Production Receipt Doc Type - from above)
0:32:00 - can you use a Purchase Order as the order?
0:39:00 - which users feel the most pain in the current situation (planner or receiver)
0:41:30 - tie the above scenario to Libero
2014-09-18 Security and Stability Discussion
Introduction
0:01:45 Today's topics
0:03:45 Installation Script
0:08:30 Operating System
0:09:45 Database
0:11:15 - backup strategies
0:16:00 - hot-standby replication
ACTION: upgrading the Ubuntu OS should upgrade your PostgreSQL instance as well.
As a result of this discussion, I created a chuboe_ubuntu_upgrade.sh in the chuboe_utils directory.
I also updated the cronJobs.txt file to include an entry for running weekly upgrades.
0:18:00 Web Server (WebUI)
Note: I updated the chuboe_hg_bindir.sh to be able to run it daily to create a daily commit.
I also updated the cronJobs.txt to include an entry for this script.
0:24:00 AWS (Amazon Web Service) for cloud hosting
0:27:30 Using Security Groups as cocoons
0:32:45 iDempiere Security (Role management)
ACTION: is there a log when someone exports: No
I created an experiment:
Set logs to "Finer"
Export all products
Look at log for key term "Export" - nothing
Looked at AD_ChangeLog - nothing
Looked through logs of any sign of an export - nothing that I could audit.
0:39:00 iDempiere Security (user security)
2014-09-18 AM - Open Discussion
Question: can you change the way the system tracks currency rates? Specifically, can you have each document track its own currency conversion rate?
0:05:00 Walking through the purchase process with multiple currencies
0:13:30 Walking through the sales process with multiple currencies
0:22:00 - discussion about updating the Sales Order to track a negotiated conversion rate and display a discount based on the currency advantage. BTW - it takes me a while to understand the domain - sorry for the delay :)