How to Create Sale Trade Conditions
by OSOE Project.
This visual guide is part of a collection of documents created by the One
Student One ERP (OSOE) project in collaboration with Institut Mines Telecom,
Telecom Bretagne, Dresden University of Technology and the South Westfalia
University of Applied Sciences. It can be used to teach modern ERP theory and
practice to undergraduate students or professionals.
Copyright: You are free to copy, distribute, display, and perform the work
under the following conditions: you must attribute the work in the manner
specified by the author or licensor; you may not use this work for any
commercial purposes including training, consulting, advertising,
self-advertising, publishing, etc.; you may not alter, transform, or build upon
this work. For any reuse or distribution, you must make clear to others the
license terms of this work. Any of these conditions can be waived if you get
permission from the copyright holder through a commercial license or an
educational license. For more information, contact info@nexedi.com
init
openAndWait ${base_url}/Zuite_createFunctionalTestUser
verifyTextPresent Done
Wait for activities
openAndWait ${base_url}/Zuite_setUpSaleTradeConditionTest
verifyTextPresent Init Ok
Wait for activities
Login As Functional Test User
Agenda
• What are trade conditions
• How to create trade conditions
• How and where to apply them
This guide will teach you how to create Sale Trade Conditions in ERP5 Express,
using ERP5 Express Trade. You will also learn how to apply a Trade Condition to
a Sale Order. Note that Sale Trade Conditions and Purchase Trade Condition are
strictly identical, which means that after reading this tutorial, you will be
able to create both purchase and sale trade conditions.
What are Trade Conditions?
What are Trade Conditions?
Trade conditions, as you will notice in this tutorial look like sale or
purchase orders documents. The idea is that trade conditions help you store
some information that you use in a specific type of order. Once this
information is stored, you can import it from the Trade Condition to the Sale
or Purchase Order in order to save time. On a Trade Condition, you can set
information about the payment mode, the currency, the tax behaviour, the
discount behaviour, the delivery mode, the incoterm. This information will be
stored only in those trade conditions, and imported whenever necessary to
different sale/purchase orders, as many times as you need.
Create a Sale Trade Condition
Create a Sale Trade Condition
In order to create a Sale Trade Condition document from the home page of your
instance, click the New tab on the sidebar and click on Sale Trade Condition in
the Trade area.
waitForElementPresent //button[text()="Sale Trade Condition"]
click //input[@name="editable"]
click //button[text()="Sale Trade Condition"]
The Trade Conditions document
Trade Conditions document
Your Sale Trade Condition document has been created successfully, and as you
can see on the picture, Sale Trade Conditions look exactly the same as Sale
Orders. The reason for this is that the information borne on Sale Trade
Conditions are identical as the information borne by Sale Orders.
Fill the View Tab
Fill the View Tab
Add a title to your Trade Condition in the Red area, and then add the
black fields with information about the sender, the seller and the supplier.
The green area displays the effective and validity dates, and comments for the
other users of your ERP5 instance.
Another important field which is necessary to fill when you are creating any
Sale/Purchase Trade Conditions, is the "Specialised Trade Conditions and
Business Processes ". It defines the workflow of the ERP5 trade module (Sale/
Purchase Orders, Sale/Purchase Packing Lists and Invoices) which you need to
apply this Trade Condition later. To fill the field, click on the magnifying
glass.
Note: Please replace "Hongzhao" with the company you created when you
configured your ERP5 instance.
waitForElementPresent //input[@name=
"field_my_title"]
type //input[@name= ZUITE-TEST-SALE-TRADE-CONDITION-001
"field_my_title"]
//div[@data-gadget-scope=
type "field_my_description"]// erp5_default_business_process
textarea
type //input[@name= ZUITE-TEST-SALE-TRADE-CONDITION-001
"field_my_reference"]
select //select[@name= EUR
"field_my_price_currency"]
select //select[@name= Carriage Paid To
"field_my_incoterm"]
type //textarea[@name= VAT
"field_my_comment"]
"Specialised Trade Conditions and Business Processes " (1)
Specialised Business Processes
In this page, you can choose Specialised Trade Conditions and Business
Processes. Because we are creating a Sale Trade Condition, so here we choose in
the first line "Business Processes" . This goes the same when you create any
other Sale/Purchase Trade Conditions.
"Specialised Trade Conditions and Business Processes" (2)
Default Business Processes
Now you can see there is an option "Default Trade Business Process" on the
"Specialised Trade Conditions and Business Processes" list, it is created
automatically by the ERP5 configurator when you configurated your instance.
Please click on "Set Relation" icon in the last column (highlighted in red) .
Note that you can also create your own "Business Process" using the "Business
Processes Module" in ERP5.
"Specialised Trade Conditions and Business Processes" (3)
Specialised Trade Conditions and Business Processes
Now you are led again to the View page of the sale trade condition you created.
You will see the "Specialised Trade Conditions and Business Processes" has been
defined . Remember that this field is obligated to be filled up when you create
any Sale/Purchase Trade Conditions.
Fill the Payment Tab(1)
Fill Payment Tab
The Payment tab displays the payment mode you want to be applied to your
orders. In order to edit the Payment mode, click on the payment tab on the
sidebar of the Sale Trade Condition document and jump to this page.
The area circled in red on the picture is the default payment condition that
will be applied to your orders whenever you decide to import those sale trade
conditions to them. In this area, you can set the following information:
payment mode, trade date, term, end of month and additional term. When you are
done, click the save button and jump to next step.
select //select[@name="field_my_payment_condition_payment_mode"] Credit Card
select //select[@name="field_my_payment_condition_trade_date"] Invoice
Fill the Payment Tab (2)
Add Payment Conditions
In many cases, you will need more complex payment options. For instance you
might need your customers to pay an advance on payment, and pay the balance
when the goods are delivered. This is possible in ERP5 Express to add more than
one payment conditions, which means that you can build complex payment
conditions, following this procedure:
Click on the "+Add" on the previous page (payment tab page) and select to
create "Payment Condition" as showing in the screenshot, then click on "Create
Document" to create the new payment condition.
click //a[contains(text(), "Add")] Payment
Condition
waitForElementPresent //select[@name=
"field_your_select_action"]
select //select[@name= Payment
"field_your_select_action"] Condition
Fill the Payment Tab(3)
New Payment Condition
This is the new payment condition that has been created from previous page.
This condition will not replace the default payment conditions but will be
added to them. As you can see circled in red on the picture, you can first
decide the % or the amount that will have to be paid following the rules of
this payment condition. When you are done, click the save button.
waitForElementPresent //input[@name=
"field_my_title"]
type //input[@name= ZUITE-TEST-PAYMENT-CONDITON-002
"field_my_title"]
//div[@data-gadget-scope= Description of
type "field_my_description"]// ZUITE-TEST-PAYMENT-CONDITION-002
textarea
storeLocation before_sale_trade_condition
Wait for activities
open $
{before_sale_trade_condition}
Fill the Payment Tab(4)
Advance Payment
This Payment condition is in fact an Advance on Payment of 20%. We have input
some information about when this advance payment should be paid and the payment
mode. Refer to the screenshot for more details. When you are done, click the
save button.
tal:block>
Fill the Payment Tab(5)
Additional Payments
Back on the Payment Tab of the Sale Trade Condition, you can see that the
Payment Condition you have created has been added to the Additional Payment
Lines. For your information, the default_payment line is the line that has been
created automatically when you filled the Payment tab in the previous steps.
We will now edit the default payment line. Click on the line, and jump to next
page.
waitForElementPresent //a[contains(text(),
"ZUITE-TEST-SALE-TRADE-CONDITION-001")]
click //a[contains(text(),
"ZUITE-TEST-SALE-TRADE-CONDITION-001")]
Fill the Payment Tab(6)
Edit default payment condition
We will change the "title" and "percentage of total" of the line and add a
description. This line in fact is the balance of the Payment,
waitForElementPresent //p[contains(text(),
"default_payment_condition")]
click //p[contains(text(),
"default_payment_condition")]
waitForElementPresent //input[@name=
"field_my_title"]
type //input[@name= ZUITE-TEST-PAYMENT-CONDITION-001
"field_my_title"]
//div[@data-gadget-scope= Description of
type "field_my_description"]// ZUITE-TEST-PAYMENT-CONDITION-001
textarea
Fill the Payment Tab(7)
Balance
When you are done, save your work and go back to the payment tab of your Sale
Trade Conditions.
verifyValue //input[@name="field_my_title"] ZUITE-TEST-PAYMENT-CONDITION-001
Finalized Payment Conditions
Finalized Payment Conditions
As you can see here, the two lines have been created, one line for the Advance
Payment and one line for the Balance. We are done with the payment Conditions,
we will now see the Profile Tab.
tal:block>
waitForElementPresent //a[contains(text(),
"ZUITE-TEST-SALE-TRADE-CONDITION-001")]
click //a[contains(text(),
"ZUITE-TEST-SALE-TRADE-CONDITION-001")]
waitForElementPresent //p[text()="ZUITE-TEST-SALE-TRADE-CONDITION-001"]
verifyTextPresent ZUITE-TEST-PAYMENT-CONDITION-001
verifyTextPresent ZUITE-TEST-PAYMENT-CONDITION-002
The Profile Tab
The Profile Tab
This tab gathers information about the two parties of the sale order-the
supplier parts are circled in red, the client parts are circled in black. Some
information of the supplier part have already been filled if you filled the
view tab correctly. The only fields you have to edit here are the "Invoice
Sender" and the "Payee". You will notice that the "Payee" has no options, this
is because you haven't edited the "Financial Information" tab of the your
organisation which you put in the supplier fields. So we will now add a "Bank
Account" in the "Financial Information" tab of the organisation.
Note that for the client fields which are circled in black, the information are
necessary to fill up when you set a sale order with your customer, but you
don't have to edit them now, because these fields are different according to
different sale orders. So you can edit them differently in each particular Sale
Order document, after you have imported the general Sale Payment Conditions
which we just created.
Add Payee
Sale Trade Conditions-Supplier
In a Sale Order, the one who gets paid is usually the supplier. Therefore we
define in the Payee field our own bank account. If you cannot select any bank
account, than you first have to create a bank account for your organisation as
described in the tutorial How to create Bank Accounts
waitForElementPresent //input[@name=
"field_my_source_section_title"]
type //input[@name= ZUITE-TEST-SALEORDER-ORGANISATION-001
"field_my_source_section_title"]
fireEvent //input[@name= input
"field_my_source_section_title"]
waitForElementPresent //ul[@class="search_ul"]//li
click //ul[@class="search_ul"]/li[1]
type //input[@name="field_my_source_title"] ZUITE-TEST-SALEORDER-ORGANISATION-001
fireEvent //input[@name="field_my_source_title"] input
waitForElementPresent //ul[@class="search_ul"]//li
click //ul[@class="search_ul"]//li[1]
type //input[@name= ZUITE-TEST-SALEORDER-ORGANISATION-001
"field_my_source_decision_title"]
fireEvent //input[@name= input
"field_my_source_decision_title"]
waitForElementPresent //ul[@class="search_ul"]//li
click //ul[@class="search_ul"]//li[1]
type //input[@name= ZUITE-TEST-SALEORDER-ORGANISATION-001
"field_my_source_administration_title"]
fireEvent //input[@name= input
"field_my_source_administration_title"]
waitForElementPresent //ul[@class="search_ul"]//li
click //ul[@class="search_ul"]//li[1]
verifyValue //input[@name= ZUITE-TEST-SALEORDER-ORGANISATION-001
"field_my_source_section_title"]
verifyValue //input[@name="field_my_source_title"] ZUITE-TEST-SALEORDER-ORGANISATION-001
verifyValue //input[@name= ZUITE-TEST-SALEORDER-ORGANISATION-001
"field_my_source_decision_title"]
verifyValue //input[@name= ZUITE-TEST-SALEORDER-ORGANISATION-001
"field_my_source_administration_title"]
Validate the Sale Trade Condition
Validate Sale Trade Condition
The final step to create the a Sale Trade Condition, is to go back to the View
tab and Validate it.
For now, you have successfully created a Sale Trade Condition, which you can
apply later. The steps to create a Purchase Trade Condition are the same. Now
we will show you how and where to apply them.
Create a Sale Order
Create a Sale Order
Now we have created Sale Trade Conditions, how can we apply them?
The Trade Conditions are mostly used when we create a Sale/Purchase order from
the Home Page of your ERP5 instance. So click on the new tab and choose Sale
Order in the Trade Area .
Wait for activities
open ${base_url}
waitForElementPresent //button[text()="Sale
Order"]
click //input[@name="editable"]
click //button[text()="Sale
Order"]
waitForElementPresent //input[@name=
"field_my_title"]
type //input[@name= ZUITE-TEST-TRADE-CONDITION-SALE-ORDER-001
"field_my_title"]
type //input[@name= ZUITE-TEST-SALE-TRADE-CONDITION-001
"field_my_specialise_title"]
fireEvent //input[@name= input
"field_my_specialise_title"]
waitForElementPresent //ul[@class="search_ul"]//li
click //ul[@class="search_ul"]//li
[1]
Apply Trade Conditions
Apply Sale Trade Condition
When the order is created, enter the name of your Trade Condition in the Trade
Condition field , as highlighted in red on the screenshot (You can also choose
from the Sale Trade Conditions list by clicking on the magnifying glass icon).
When it is done, save by clicking the Save Button. The third step, is to click
on "Apply Sale Trade Condition" on the sidebar.
tal:block>
Imported trade condition information on View tab
Imported information on View tab
As you can see, the View tab has been filled with information imported from the
Sale Trade Condition you choose to apply.
waitForElementPresent //input[@name=
"field_my_source_decision_title"]
verifyValue //input[@name= ZUITE-TEST-SALEORDER-ORGANISATION-001
"field_my_source_decision_title"]
verifyValue //input[@name= ZUITE-TEST-SALEORDER-ORGANISATION-001
"field_my_source_title"]
The profile tab is updated
The profile tab is updated
The Profile Tab has been updated as well.
In the following tutorials about sale/purchase orders, packing lists, invoices
and payments, you will see the Specialised Business Processes you just defined
in the Trade Conditions will also be applied automatically once you apply the
Trade Conditions with the defined business processes.
verifyValue //input[@name= ZUITE-TEST-SALEORDER-ORGANISATION-001
"field_my_source_section_title"]
verifyValue //input[@name="field_my_source_title"] ZUITE-TEST-SALEORDER-ORGANISATION-001
verifyValue //input[@name= ZUITE-TEST-SALEORDER-ORGANISATION-001
"field_my_source_decision_title"]
verifyValue //input[@name= ZUITE-TEST-SALEORDER-ORGANISATION-001
"field_my_source_administration_title"]
Login As Manager
Wait for activities
openAndWait ${base_url}/
Zuite_tearDownSaleTradeConditionTest
verifyTextPresent Clean Ok
Wait for activities