Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add document Flag by default #3041

Merged
merged 3 commits into from Mar 1, 2020

Conversation

yamelsenih
Copy link
Member

After issue #94 each table can be flagged as Document, the change is nice for add defult columns to document.

This pull request set default IsDocument as true when a document have DocAction column and is not a view:

A simple SQL:
SELECT TableName, Name FROM AD_Table WHERE IsView = 'N' AND TableName NOT LIKE 'I_%' AND EXISTS(SELECT 1 FROM AD_Column c WHERE c.AD_Table_ID = AD_Table.AD_Table_ID AND c.ColumnName IN('DocStatus', 'DocAction'));

       tablename       |             name              
-----------------------+-------------------------------
 M_InOut               | Shipment/Receipt
 M_Inventory           | Phys.Inventory
 M_Movement            | Inventory Move
 C_Cash                | Cash Journal
 WM_InOutBound         | In & Out Bound Order
 M_Production          | Production
 C_DocTypeCounter      | Counter Document
 C_AllocationHdr       | Allocation
 M_MovementConfirm     | Move Confirm
 C_BankStatement       | Bank Statement
 M_Requisition         | Requisition
 M_InOutConfirm        | Ship/Receipt Confirmation
 AD_WF_Node            | Node
 M_RMA                 | RMA
 GL_Journal            | Journal
 GL_JournalBatch       | Journal Batch
 C_Payment             | Payment
 A_Asset_Disposed      | Asset Disposed
 PP_MRP                | Material Requirement Planning
 HR_Process            | Payroll Process
 A_Asset_Transfer      | A_Asset_Transfer_ID
 A_Depreciation_Entry  | Depreciation Entry
 PP_Order_Node         | Manufacturing Order Activity
 PP_Cost_Collector     | Manufacturing Cost Collector
 DD_Order              | Distribution Order
 PP_Order              | Manufacturing Order
 A_Asset_Addition      | Asset Addition
 A_Asset_Reval         | Asset Revaluation
 HR_JobOpening         | Job Openings 
 HR_Leave              | Leave
 C_PaySelection        | Payment Selection
 M_ProductionBatch     | Production Batch
 C_CommissionRun       | Commission Run
 DD_Freight            | Order Freight ID
 R_StandardRequestType | Standard Request Type
 C_Invoice             | Invoice
 S_TimeExpense         | Expense Report
 A_Asset_Split         | Fixed Asset Split Document
 C_Order               | Order
 FM_Batch              | Financial Transaction Batch
 FM_Agreement          | Agreement
 HR_AttendanceBatch    | Attendance Batch
 HR_Incidence          | Employee Incidence

@marcalwestf
Copy link
Collaborator

marcalwestf commented Mar 1, 2020

hi @yamelsenih nice catch.

I see right now, almost all tables have set isDocument == N
Selection_386

which for actual documents makes unusable the code
image

With this change, all necessary columns for an Adempiere document will be created.

@marcalwestf
Copy link
Collaborator

after applying the XML, the tables which define documents have the flag set correctly:
Selection_387

@marcalwestf
Copy link
Collaborator

....perhaps the only small change needed would be to add the pull request ID to the Comments field.

Copy link
Collaborator

@marcalwestf marcalwestf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testy passed

@marcalwestf marcalwestf added the 14 Waiting for User Changes Waiting for Pull request User make changes label Mar 1, 2020
@yamelsenih
Copy link
Member Author

Thans @marcalwestf I will add it

@marcalwestf marcalwestf merged commit 211bbc8 into adempiere:develop Mar 1, 2020
@yamelsenih yamelsenih deleted the bugfix/#IsDocument-Flag-R1 branch March 1, 2020 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants