Merge branch 'develop' into set_defualt_mode_payment
@@ -15,6 +15,8 @@ services:
|
|||||||
- mysql
|
- mysql
|
||||||
|
|
||||||
install:
|
install:
|
||||||
|
- pip install flake8==3.3.0
|
||||||
|
- flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
|
||||||
- sudo rm /etc/apt/sources.list.d/docker.list
|
- sudo rm /etc/apt/sources.list.d/docker.list
|
||||||
- sudo apt-get purge -y mysql-common mysql-server mysql-client
|
- sudo apt-get purge -y mysql-common mysql-server mysql-client
|
||||||
- nvm install v7.10.0
|
- nvm install v7.10.0
|
||||||
|
|||||||
@@ -8,8 +8,7 @@ Includes: Accounting, Inventory, Manufacturing, CRM, Sales, Purchase, Project Ma
|
|||||||
|
|
||||||
ERPNext is built on the [Frappe](https://github.com/frappe/frappe) Framework, a full-stack web app framework in Python & JavaScript.
|
ERPNext is built on the [Frappe](https://github.com/frappe/frappe) Framework, a full-stack web app framework in Python & JavaScript.
|
||||||
|
|
||||||
- [User Guide](https://frappe.github.io/erpnext/)
|
- [User Guide](https://erpnext.org/docs/user)
|
||||||
- [Getting Help](http://erpnext.org/getting-help.html)
|
|
||||||
- [Discussion Forum](https://discuss.erpnext.com/)
|
- [Discussion Forum](https://discuss.erpnext.com/)
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|||||||
@@ -158,7 +158,6 @@ def get_balance_on(account=None, date=None, party_type=None, party=None, company
|
|||||||
return flt(bal)
|
return flt(bal)
|
||||||
|
|
||||||
def get_count_on(account, fieldname, date):
|
def get_count_on(account, fieldname, date):
|
||||||
|
|
||||||
cond = []
|
cond = []
|
||||||
if date:
|
if date:
|
||||||
cond.append("posting_date <= '%s'" % frappe.db.escape(cstr(date)))
|
cond.append("posting_date <= '%s'" % frappe.db.escape(cstr(date)))
|
||||||
@@ -195,11 +194,6 @@ def get_count_on(account, fieldname, date):
|
|||||||
select name from `tabAccount` ac where ac.name = gle.account
|
select name from `tabAccount` ac where ac.name = gle.account
|
||||||
and ac.lft >= %s and ac.rgt <= %s
|
and ac.lft >= %s and ac.rgt <= %s
|
||||||
)""" % (acc.lft, acc.rgt))
|
)""" % (acc.lft, acc.rgt))
|
||||||
|
|
||||||
# If group and currency same as company,
|
|
||||||
# always return balance based on debit and credit in company currency
|
|
||||||
if acc.account_currency == frappe.db.get_value("Company", acc.company, "default_currency"):
|
|
||||||
in_account_currency = False
|
|
||||||
else:
|
else:
|
||||||
cond.append("""gle.account = "%s" """ % (frappe.db.escape(account, percent=False), ))
|
cond.append("""gle.account = "%s" """ % (frappe.db.escape(account, percent=False), ))
|
||||||
|
|
||||||
@@ -534,7 +528,7 @@ def get_stock_and_account_difference(account_list=None, posting_date=None):
|
|||||||
account_balance = get_balance_on(account_data.get('account'), posting_date, in_account_currency=False)
|
account_balance = get_balance_on(account_data.get('account'), posting_date, in_account_currency=False)
|
||||||
stock_value = get_stock_value_on(warehouse, posting_date)
|
stock_value = get_stock_value_on(warehouse, posting_date)
|
||||||
if abs(flt(stock_value) - flt(account_balance)) > 0.005:
|
if abs(flt(stock_value) - flt(account_balance)) > 0.005:
|
||||||
difference.setdefault(account, flt(stock_value) - flt(account_balance))
|
difference.setdefault(account_data.get('account'), flt(stock_value) - flt(account_balance))
|
||||||
|
|
||||||
return difference
|
return difference
|
||||||
|
|
||||||
@@ -695,9 +689,6 @@ def get_children():
|
|||||||
|
|
||||||
return acc
|
return acc
|
||||||
|
|
||||||
def create_payment_gateway_account(gateway):
|
|
||||||
create_payment_gateway_account(gateway)
|
|
||||||
|
|
||||||
def create_payment_gateway_account(gateway):
|
def create_payment_gateway_account(gateway):
|
||||||
from erpnext.setup.setup_wizard.setup_wizard import create_bank_account
|
from erpnext.setup.setup_wizard.setup_wizard import create_bank_account
|
||||||
|
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
- [ERPNext Manual in German](http://frappe.github.io/erpnext/user/manual/de/) contributed by [CWT Connector & Wire Technology GmbH](http://www.cwt-assembly.com/)
|
- [ERPNext Manual in German](http://erpnext.org/docs/user/manual/de/) contributed by [CWT Connector & Wire Technology GmbH](http://www.cwt-assembly.com/)
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
- **[Multi-currency Accounting](https://frappe.github.io/erpnext/user/guides/accounts/multi-currency-accounting)**: You can now have an Account in a different currency than your Company's currency
|
- **[Multi-currency Accounting](https://frappe.io/docs/user/guides/accounts/multi-currency-accounting)**: You can now have an Account in a different currency than your Company's currency
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
docs_version = "7.x.x"
|
|
||||||
|
|
||||||
source_link = "https://github.com/frappe/erpnext"
|
source_link = "https://github.com/frappe/erpnext"
|
||||||
docs_base_url = "https://frappe.github.io/erpnext"
|
docs_base_url = "https://frappe.github.io/erpnext"
|
||||||
headline = "ERPNext Documentation"
|
headline = "ERP Made Simple"
|
||||||
sub_heading = "Detailed explanation for all ERPNext features and developer API"
|
sub_heading = "ERPNext User Guides and API References"
|
||||||
long_description = """ERPNext is a fully featured ERP system designed for Small and Medium Sized
|
long_description = """
|
||||||
|
ERPNext is a fully featured ERP system designed for Small and Medium Sized
|
||||||
business. ERPNext covers a wide range of features including Accounting, CRM,
|
business. ERPNext covers a wide range of features including Accounting, CRM,
|
||||||
Inventory management, Selling, Purchasing, Manufacturing, Projects, HR &
|
Inventory management, Selling, Purchasing, Manufacturing, Projects, HR &
|
||||||
Payroll, Website, E-Commerce and much more.
|
Payroll, Website, E-Commerce and much more.
|
||||||
@@ -17,7 +16,15 @@ to extend ERPNext functionality.
|
|||||||
|
|
||||||
ERPNext is Open Source under the GNU General Public Licence v3 and has been
|
ERPNext is Open Source under the GNU General Public Licence v3 and has been
|
||||||
listed as one of the Best Open Source Softwares in the world by many online
|
listed as one of the Best Open Source Softwares in the world by many online
|
||||||
blogs."""
|
blogs.
|
||||||
|
|
||||||
|
### Getting Started
|
||||||
|
|
||||||
|
To install ERPNext on a server, you will need to install [Frappe Bench](https://github.com/frappe/bench).
|
||||||
|
|
||||||
|
You can also start a free 30 day trial at [https://erpnext.com](https://erpnext.com)
|
||||||
|
|
||||||
|
"""
|
||||||
|
|
||||||
splash_light_background = True
|
splash_light_background = True
|
||||||
google_analytics_id = 'UA-8911157-22'
|
google_analytics_id = 'UA-8911157-22'
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 52 KiB |
|
Before Width: | Height: | Size: 89 KiB |
|
Before Width: | Height: | Size: 115 KiB |
|
Before Width: | Height: | Size: 100 KiB |
|
Before Width: | Height: | Size: 48 KiB |
|
Before Width: | Height: | Size: 566 KiB |
|
Before Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 177 KiB |
|
After Width: | Height: | Size: 188 KiB |
|
After Width: | Height: | Size: 164 KiB |
|
After Width: | Height: | Size: 144 KiB |
|
After Width: | Height: | Size: 200 KiB |
@@ -1,45 +1,5 @@
|
|||||||
# Benutzer-Berechtigungen
|
# Benutzer-Berechtigungen
|
||||||
<span class="text-muted contributed-by">Beigetragen von CWT Connector & Wire Technology GmbH</span>
|
|
||||||
|
|
||||||
Verwenden Sie den Benutzerberechtigungen-Manager um den Zugriff eines Benutzers auf eine Menge von Dokumenten einzuschränken.
|
This document has been changed but not yet translated. Please see the English Version
|
||||||
|
|
||||||
Rollenbasierte Berechtigungen definieren den Rahmen an Dokumententypen, innerhalb derer sich ein Benutzer mit einer Anzahl von Rollen bewegen darf. Sie können jedoch noch feinere Einstellungen treffen, wenn Sie für einen Benutzer Benutzerberechtigungen definieren. Wenn Sie bestimmte Dokumente in der Liste der Benutzerberechtigungen eintragen, dann können Sie den Zugriff dieses Benutzers auf bestimmte Dokumente eines bestimmten DocTypes begrenzen, unter der Bedingung, dass die Option "Benutzerberechtigungen anwenden" im Rollenberechtigungs-Manager aktiviert ist.
|
<a href="{{docs_base_url}}/erpnext/user/manual/en/setting-up/users-and-permissions/user-permissions">User Permission</a>
|
||||||
|
|
||||||
Beginnen Sie wie folgt:
|
|
||||||
|
|
||||||
> Einstellungen > Berechtigungen > Benutzerrechte-Manager
|
|
||||||
|
|
||||||
|
|
||||||
Abbildung: Übersicht aus dem Benutzerberechtigungs-Manager die aufzeigt, wie Benutzer nur auf bestimmte Firmen zugreifen können
|
|
||||||
|
|
||||||
#### Beispiel
|
|
||||||
|
|
||||||
Der Benutzer "aromn@example.com" hat die Rolle "Nutzer Vertrieb" und wir möchten die Zugriffsrechte des Benutzers so einschränken, dass er nur auf Datensätze einer bestimmten Firma, nämlich der Wind Power LLC, zugreifen kann.
|
|
||||||
|
|
||||||
1\. Wir fügen eine Benutzerberechtigungs-Zeile für die Firma hinzu.
|
|
||||||
|
|
||||||
Abbildung: Hinzufügen einer Zeile "Benutzer-Berechtigung" für die Kombination aus dem Benutzer "aromn@example.com" und der Firma Wind Power LLC
|
|
||||||
|
|
||||||
2\. Die Rolle "Alle" hat nur Leseberechtigungen für die Firma, "Benutzer-Berechtigungen anwenden" ist aktiviert.
|
|
||||||
|
|
||||||
Abbildung: Leseberechtigung mit aktivierter Option "Benutzer-Berechtigungen anwenden" für den DocType Firma
|
|
||||||
|
|
||||||
3\. Die oben abgebildete Kombination der zwei Regeln führt dazu, dass der Benutzer "aromn@example.com" für die Firma Wind Power LLC nur Leserechte hat.
|
|
||||||
|
|
||||||
Abbildung: Der Zugriff wird auf die Firma Wind Power LLC beschränkt
|
|
||||||
|
|
||||||
4\. Wir möchten nun diese Benutzer-Berechtigung für "Firma" auf andere Dokumente wie "Angebot", "Kundenauftrag" etc. übertragen. Diese Formulare haben **Verknüpfungsfelder zu "Firma"**. Als Ergebnis werden Benutzer-Berechtigungen von "Firma" auch auf diese Dokumente übertragen, was dazu führt, dass der Benutzer "aromn@example.com" auf diese Dokumente zugreifen kann, wenn Sie mit Wind Power LLC verbunden sind.
|
|
||||||
|
|
||||||
Abbildung: Benutzer mit der Rolle "Nutzer Vertrieb" können, basierend auf Ihren Benutzer-Berechtigungen, Angebote lesen, schreiben, erstellen, übertragen und stornieren, wenn "Benutzer-Berechtigungen anwenden" aktiviert ist.
|
|
||||||
|
|
||||||
Abbildung: Die Auflistung der Angebote enthält nur Ergebnisse für die Firma Wind Power LLC für den Benutzer "aromn@example.com"
|
|
||||||
|
|
||||||
5\. Benutzer-Berechtigungen werden automatisch auf Basis von verknüpften Feldern angewandt, genauso wie wir es bei den Angeboten gesehen haben. Aber: Das Lead-Formular hat vier Verknüpfungsfelder: "Region", "Firma", "Eigentümer des Leads" und "Nächster Kontakt durch". Nehmen wir an, Sie möchten dass die Leads den Zugriff des Benutzers basierend auf Ihrer Region einschränken, obwohl Sie für die DocTypes "Benutzer", "Region" und "Firma" Benutzer-Berechtigungen angelegt haben. Dann gehen Sie wir folgt vor: Aktivieren Sie die Option "Benutzer-Berechtigungen ignorieren" für die Verknüpfungsfelder "Firma", "Eigentümer des Leads" und "Nächster Kontakt durch".
|
|
||||||
|
|
||||||
Abbildung: Der Vertriebsmitarbeiter kann Leads lesen, schreiben und erstellen, eingeschränkt durch Benutzer-Berechtigungen.
|
|
||||||
|
|
||||||
Abbildung: Markieren Sie "Benutzer-Berechtigungen ignorieren" für die Felder "Firma", "Lead-Inhaber" und "Nächster Kontakt durch" über Setup > Anpassen > Formular anpassen > Lead.
|
|
||||||
|
|
||||||
Abbildung: Aufgrund der obigen Kombination kann der Benutzer "aromn@example.com" nur auf Leads der Region "United States" zugreifen.
|
|
||||||
|
|
||||||
{next}
|
|
||||||
|
|||||||
@@ -12,12 +12,12 @@ Report Builder is an in-built report customization tool in ERPNext. This allows
|
|||||||
|
|
||||||
Query Report is written in SQL which pull values from account's database and fetch in the report. Though SQL queries can be written from front end, like HTML, its restricted in hosted users. Because it will allow users with no access to specific report to query data directly from the database.
|
Query Report is written in SQL which pull values from account's database and fetch in the report. Though SQL queries can be written from front end, like HTML, its restricted in hosted users. Because it will allow users with no access to specific report to query data directly from the database.
|
||||||
|
|
||||||
Check Purchase Order Item to be Received report in Stock module for example of Query report. Click [here](https://frappe.github.io/frappe/user/en/guides/reports-and-printing/how-to-make-query-report.html) to learn how to create Query Report.
|
Check Purchase Order Item to be Received report in Stock module for example of Query report. Click [here](https://frappe.io/docs/user/en/guides/reports-and-printing/how-to-make-query-report.html) to learn how to create Query Report.
|
||||||
|
|
||||||
### 3. Script Report
|
### 3. Script Report
|
||||||
|
|
||||||
Script Reports are written in Python and stored on server side. These are complex reports which involves logic and calculation. Since these reports are written on server side, customizing it from hosted account is not possible.
|
Script Reports are written in Python and stored on server side. These are complex reports which involves logic and calculation. Since these reports are written on server side, customizing it from hosted account is not possible.
|
||||||
|
|
||||||
Check Financial Analytics report in Accounts module for example of Script Report. Click [here](https://frappe.github.io/frappe/user/en/guides/reports-and-printing/how-to-make-script-reports.html) to learn how to create Script Report.
|
Check Financial Analytics report in Accounts module for example of Script Report. Click [here](https://frappe.io/docs/user/en/guides/reports-and-printing/how-to-make-script-reports.html) to learn how to create Script Report.
|
||||||
|
|
||||||
<!-- markdown -->
|
<!-- markdown -->
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<!--markdown-->
|
<!--markdown-->
|
||||||
Before we venture to learn form customization tool, click [here](https://frappe.github.io/frappe/user/en/tutorial/doctypes.html) to understand the architecture of forms in ERPNext. It shall help you in using Customize Form tool more efficiently.
|
Before we venture to learn form customization tool, click [here](https://frappe.io/docs/user/en/tutorial/doctypes.html) to understand the architecture of forms in ERPNext. It shall help you in using Customize Form tool more efficiently.
|
||||||
|
|
||||||
Customize Form is the tool which allows user to customize property of the standard fields, and insert [custom fields]({{docs_base_url}}/user/manual/en/customize-erpnext/custom-field.html) as per the requirement. Let's assume we need to set Project Name field as a mandatory field in the Sales Order form. Following are the steps which shall be followed to achieve this.
|
Customize Form is the tool which allows user to customize property of the standard fields, and insert [custom fields]({{docs_base_url}}/user/manual/en/customize-erpnext/custom-field.html) as per the requirement. Let's assume we need to set Project Name field as a mandatory field in the Sales Order form. Following are the steps which shall be followed to achieve this.
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
<!-- Getting Started with ERPNext-->
|
||||||
|
|
||||||
|
# Getting Started with ERPNext
|
||||||
|
|
||||||
There are many ways to get started with ERPNext.
|
There are many ways to get started with ERPNext.
|
||||||
|
|
||||||
### 1\. See the Demo
|
### 1\. See the Demo
|
||||||
|
|||||||
@@ -83,6 +83,6 @@ Print Heading.
|
|||||||
|
|
||||||
While making your sales transactions like a Quotation (or Sales Order) you
|
While making your sales transactions like a Quotation (or Sales Order) you
|
||||||
can also give discounts to your customers. In the Discount section, add
|
can also give discounts to your customers. In the Discount section, add
|
||||||
the discount in percentage or fixed amount. Read [Discount](https://frappe.github.io/erpnext/user/manual/en/selling/articles/applying-discount) for more explanation.
|
the discount in percentage or fixed amount. Read [Discount](https://erpnext.org/docs/user/manual/en/selling/articles/applying-discount) for more explanation.
|
||||||
|
|
||||||
{next}
|
{next}
|
||||||
|
|||||||
@@ -2,6 +2,6 @@
|
|||||||
|
|
||||||
For now, ERPNext has out-of-the-box integration available for some applications like Shopify, your SMS gateway and payment gateway. To integrate ERPNext with other application, you can use REST API of Frappe. Check following links to learn more about REST API of Frappe.
|
For now, ERPNext has out-of-the-box integration available for some applications like Shopify, your SMS gateway and payment gateway. To integrate ERPNext with other application, you can use REST API of Frappe. Check following links to learn more about REST API of Frappe.
|
||||||
|
|
||||||
[Frappe Rest API](https://frappe.github.io/frappe/user/en/guides/integration/rest_api.html)
|
[Frappe Rest API](https://frappe.io/docs/user/en/guides/integration/rest_api.html)
|
||||||
|
|
||||||
<!-- markdown -->
|
<!-- markdown -->
|
||||||
@@ -1,60 +1,52 @@
|
|||||||
# User Permissions
|
# User Permissions
|
||||||
|
|
||||||
Role Base Permissions define the periphery of document types within which a user with a set of Roles can move around in. However, you can have an even finer control by defining User Permissions for a User. By setting specific documents in User Permissions list, you can limit access for that User to specific documents of a particular DocType, on the condition that "Apply User Permissions" is checked in Role Permissions Manager.
|
Along with Role based permissions, you can also set user level permissions that are based on rules that are evaluated against the data containted in the document being accessed. This is particularly useful when you want to restrict based on:
|
||||||
|
|
||||||
To start with, go to:
|
1. Allow user to access data belonging to one Company
|
||||||
|
1. Allow user to access data related to a specific Customer or Territory
|
||||||
|
|
||||||
> Setup > Permissions > User Permissions Manager
|
### Creating User Permissions
|
||||||
|
|
||||||
User Permissions Manager displaying how users can access only a specific Company.
|
To create a User Permission, go to Setup > Permission > User Permissions
|
||||||
|
|
||||||
#### Example
|
When you create a new record you will have to specify
|
||||||
|
|
||||||
User 'tom.hagen@riosolutions.com' has Sales User role and we want to limit the user to access records for only a specific Company 'Rio Solutions'.
|
1. The user for which the rule has to be applied
|
||||||
|
1. The type of document which will be allowed (for example "Company")
|
||||||
|
1. The specific item that you want to allow (the name of the "Company)
|
||||||
|
|
||||||
1. We add a User Permissions row for Company.
|
<img src="{{docs_base_url}}/assets/img/users-and-permissions/user-perms/new-user-permission.png" class="screenshot" alt="Creating a new user permission">
|
||||||
|
|
||||||
<img src="{{docs_base_url}}/assets/img/users-and-permissions/user-permissions-new.gif" class="screen" alt="User Permissions For Company">
|
If you want to apply the permissions to all Roles for that user, keep the "Apply Permissions for all Roles of this User" checked. If you check this, it will automatically setup the rules for Roles to check for User Permissions.
|
||||||
|
|
||||||
Add User Permissions row for a combination of User 'tom.hagen@riosolutions.com' and Company 'Rio Solutions'.
|
### Choosing Which Roles to Apply
|
||||||
|
|
||||||
1. Also Role "All" has only Read permission for Company, with 'Apply User Permissions' checked.
|
You can also manually edit the the roles for which you want the user permissions to apply. To do that go the the **Role Permission Manager** and select the role for which you want to Edit the User Permissions.
|
||||||
|
|
||||||
<img src="{{docs_base_url}}/assets/img/users-and-permissions/user-permissions-company-role-all.png" class="screen" alt="Role Permissions for All on Company">
|
Note that the "Apply User Permissions" is already checked for this role. Then click on "Select Document Types"
|
||||||
|
|
||||||
Read Permission with Apply User Permissions checked for DocType Company.
|
<img src="{{docs_base_url}}/assets/img/users-and-permissions/user-perms/select-document-types.png" class="screenshot" alt="Select Document Types to Edit the Setting">
|
||||||
|
|
||||||
1. The combined effect of the above two rules lead to User 'tom.hagen@riosolutions.com' having only Read access to Company 'Rio Solutions'.
|
Here you will see that Company has already been checked. If you want user permissions not be applied for that particular rule, you can un check it.
|
||||||
|
|
||||||
<img src="{{docs_base_url}}/assets/img/users-and-permissions/user-permission-company.png" class="screen" alt="Effect of Role and User Permissions on Company">
|
<img src="{{docs_base_url}}/assets/img/users-and-permissions/user-perms/view-selected-documents.png" class="screenshot" alt="Select Document Types to Edit the Setting">
|
||||||
|
|
||||||
Access is limited to Company 'Rio Solutions'.
|
### Ignoring User Permissions on Certain Fields
|
||||||
|
|
||||||
1. We want this User Permission on Company to get applied on other documents like Quotation, Sales Order, etc.
|
Another way of allowing documents to be seen that have been restricited by User Permissions is to check "Ignore User Permissions" on a particular field by going to **Customize Form**
|
||||||
|
|
||||||
These forms have a **Link Field based on Company**. As a result, User Permissions on Company also get applied on these documents, which leads to User 'tom.hagen@riosolutions' to acces these documents having Company 'Rio Solutions'.
|
For example you don't want Assets to be restricited for any user, then select **Asset** in **Customize Form** and in the Company field, check on "Ignore User Permissions"
|
||||||
|
|
||||||
<img class="screen" alt="Sales User Role Permissions for Quotation" src="{{docs_base_url}}/assets/img/users-and-permissions/user-permissions-quotation-sales-user.png" >
|
<img src="{{docs_base_url}}/assets/img/users-and-permissions/user-perms/ignore-user-user-permissions.png" class="screenshot" alt="Ignore User Permissions on specific properties">
|
||||||
|
|
||||||
Users with Sales User Role can Read, Write, Create, Submit and Cancel Quotations based on their User Permissions, since 'Apply User Permissions' is checked.
|
### Strict Permisssions
|
||||||
|
|
||||||
<img src="{{docs_base_url}}/assets/img/users-and-permissions/user-permission-quotation.png" class="screenshot" alt="Quotation List limited to results for Company 'Rio Solutions'">
|
Since User Permissions are applied via Roles, there may be many users belonging to a particular Role. Suppose you have three users belonging to Role "Accounts User" and you have applied **User Permissions** to only one user, then the permissions will only be restricted to that user.
|
||||||
|
|
||||||
Quotation List is limited to results for Company 'Rio Solutions' for User 'tom.hagen@riosolutions.com'.
|
You can change this setting incase you want the user permissions to be assigned to all users, even if they are not assigned any user permissions by going to **System Settings** and checking "Apply Strict User Permissions"
|
||||||
|
|
||||||
1. User Permissions get applied automatically based on Link Fields, just like how it worked for Quotation. But, Lead Form has 4 Link fields: Territory, Company, Lead Owner and Next Contact By. Say, you want Leads to limit access to Users based only on Territory, even though you have defined User Permissions for DocTypes User, Territory and Company. You can do this by setting 'Ignore User Permissions' for Link fields: Company, Lead Owner and Next Contact By.
|
### Checking How User Permissions are Applied
|
||||||
|
|
||||||
<img src="{{docs_base_url}}/assets/img/users-and-permissions/user-permissions-lead-role-permissions.png" class="screen" alt="Role Permissions on Lead for Sales User Role">
|
Finally once you have created your air-tight permission model, and you want to check how it applies to various users, you can see it via the **Permitted Documents for User** report. Using this report, you can select the **User** and document type and check how user permissions get applied.
|
||||||
|
|
||||||
Sales User can Read, Write and Create Leads limited by User Permissions.
|
|
||||||
|
|
||||||
<img src="{{docs_base_url}}/assets/img/users-and-permissions/user-permissions-ignore-user-permissions.png" class="screenshot" alt="Set Ingore User Permissions from Setup > Customize > Customize Form">
|
|
||||||
|
|
||||||
Check 'Ingore User Permissions' for Company, Lead Owner and Next Contact By fields using Setup > Customize > Customize Form for Lead.
|
|
||||||
|
|
||||||
<img src="{{docs_base_url}}/assets/img/users-and-permissions/permissions-lead-list.png" class="screenshot" alt="Lead List is limited to records with Territory 'United States'">
|
|
||||||
|
|
||||||
Due to the effect of the above combination, User 'tom.hagen@riosolutions.com' can only access Leads with Territory 'United States'.
|
|
||||||
|
|
||||||
{next}
|
|
||||||
|
|
||||||
|
<img src="{{docs_base_url}}/assets/img/users-and-permissions/user-perms/permitted-documents.png" class="screenshot" alt="Permitted Documents for User report">
|
||||||
|
|||||||
@@ -3,15 +3,8 @@ QUnit.module('hr');
|
|||||||
QUnit.test("Test: Attendance [HR]", function (assert) {
|
QUnit.test("Test: Attendance [HR]", function (assert) {
|
||||||
assert.expect(4);
|
assert.expect(4);
|
||||||
let done = assert.async();
|
let done = assert.async();
|
||||||
let employee_code;
|
|
||||||
|
|
||||||
frappe.run_serially([
|
frappe.run_serially([
|
||||||
// get employee's auto generated name
|
|
||||||
() => frappe.set_route("List", "Employee", "List"),
|
|
||||||
() => frappe.timeout(0.5),
|
|
||||||
() => frappe.click_link('Test Employee'),
|
|
||||||
() => frappe.timeout(0.5),
|
|
||||||
() => employee_code = frappe.get_route()[2],
|
|
||||||
// test attendance creation for one employee
|
// test attendance creation for one employee
|
||||||
() => frappe.set_route("List", "Attendance", "List"),
|
() => frappe.set_route("List", "Attendance", "List"),
|
||||||
() => frappe.timeout(0.5),
|
() => frappe.timeout(0.5),
|
||||||
@@ -21,7 +14,8 @@ QUnit.test("Test: Attendance [HR]", function (assert) {
|
|||||||
"Form for new Attendance opened successfully."),
|
"Form for new Attendance opened successfully."),
|
||||||
// set values in form
|
// set values in form
|
||||||
() => cur_frm.set_value("company", "Test Company"),
|
() => cur_frm.set_value("company", "Test Company"),
|
||||||
() => cur_frm.set_value("employee", employee_code),
|
() => frappe.db.get_value('Employee', {'employee_name':'Test Employee 1'}, 'name'),
|
||||||
|
(employee) => cur_frm.set_value("employee", employee.message.name),
|
||||||
() => cur_frm.save(),
|
() => cur_frm.save(),
|
||||||
() => frappe.timeout(1),
|
() => frappe.timeout(1),
|
||||||
// check docstatus of attendance before submit [Draft]
|
// check docstatus of attendance before submit [Draft]
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ QUnit.test("Test: Employee [HR]", function (assert) {
|
|||||||
() => frappe.set_route("List", "Employee", "List"),
|
() => frappe.set_route("List", "Employee", "List"),
|
||||||
() => frappe.new_doc("Employee"),
|
() => frappe.new_doc("Employee"),
|
||||||
() => frappe.timeout(1),
|
() => frappe.timeout(1),
|
||||||
() => cur_frm.set_value("employee_name", "Test Employee"),
|
() => cur_frm.set_value("employee_name", "Test Employee 1"),
|
||||||
() => cur_frm.set_value("salutation", "Ms"),
|
() => cur_frm.set_value("salutation", "Ms"),
|
||||||
() => cur_frm.set_value("company", "Test Company"),
|
() => cur_frm.set_value("company", "Test Company"),
|
||||||
() => cur_frm.set_value("date_of_joining", frappe.datetime.add_months(today_date, -2)), // joined 2 month from now
|
() => cur_frm.set_value("date_of_joining", frappe.datetime.add_months(today_date, -2)), // joined 2 month from now
|
||||||
@@ -26,7 +26,7 @@ QUnit.test("Test: Employee [HR]", function (assert) {
|
|||||||
() => cur_frm.save(),
|
() => cur_frm.save(),
|
||||||
() => frappe.timeout(1),
|
() => frappe.timeout(1),
|
||||||
// check name of employee
|
// check name of employee
|
||||||
() => assert.equal("Test Employee", cur_frm.doc.employee_name,
|
() => assert.equal("Test Employee 1", cur_frm.doc.employee_name,
|
||||||
'name of employee correctly saved'),
|
'name of employee correctly saved'),
|
||||||
// check auto filled gender according to salutation
|
// check auto filled gender according to salutation
|
||||||
() => assert.equal("Female", cur_frm.doc.gender,
|
() => assert.equal("Female", cur_frm.doc.gender,
|
||||||
|
|||||||
@@ -3,29 +3,46 @@ QUnit.module('hr');
|
|||||||
QUnit.test("Test: Employee attendance tool [HR]", function (assert) {
|
QUnit.test("Test: Employee attendance tool [HR]", function (assert) {
|
||||||
assert.expect(3);
|
assert.expect(3);
|
||||||
let done = assert.async();
|
let done = assert.async();
|
||||||
let attendance_date = frappe.datetime.add_days(frappe.datetime.nowdate(), -1); // previous day
|
let today_date = frappe.datetime.nowdate();
|
||||||
|
let date_of_attendance = frappe.datetime.add_days(today_date, -1); // previous day
|
||||||
|
|
||||||
frappe.run_serially([
|
frappe.run_serially([
|
||||||
|
// create employee
|
||||||
|
() => {
|
||||||
|
return frappe.tests.make('Employee', [
|
||||||
|
{salutation: "Mr"},
|
||||||
|
{employee_name: "Test Employee 2"},
|
||||||
|
{company: "Test Company"},
|
||||||
|
{date_of_joining: frappe.datetime.add_months(today_date, -2)}, // joined 2 month from now
|
||||||
|
{date_of_birth: frappe.datetime.add_months(today_date, -240)}, // age is 20 years
|
||||||
|
{employment_type: "Test Employment type"},
|
||||||
|
{holiday_list: "Test Holiday list"},
|
||||||
|
{branch: "Test Branch"},
|
||||||
|
{department: "Test Department"},
|
||||||
|
{designation: "Test Designation"}
|
||||||
|
]);
|
||||||
|
},
|
||||||
() => frappe.set_route("Form", "Employee Attendance Tool"),
|
() => frappe.set_route("Form", "Employee Attendance Tool"),
|
||||||
() => frappe.timeout(0.5),
|
() => frappe.timeout(0.5),
|
||||||
() => assert.equal("Employee Attendance Tool", cur_frm.doctype,
|
() => assert.equal("Employee Attendance Tool", cur_frm.doctype,
|
||||||
"Form for Employee Attendance Tool opened successfully."),
|
"Form for Employee Attendance Tool opened successfully."),
|
||||||
// set values in form
|
// set values in form
|
||||||
() => cur_frm.set_value("date", attendance_date),
|
() => cur_frm.set_value("date", date_of_attendance),
|
||||||
() => cur_frm.set_value("branch", "Test Branch"),
|
() => cur_frm.set_value("branch", "Test Branch"),
|
||||||
() => cur_frm.set_value("department", "Test Department"),
|
() => cur_frm.set_value("department", "Test Department"),
|
||||||
() => cur_frm.set_value("company", "Test Company"),
|
() => cur_frm.set_value("company", "Test Company"),
|
||||||
() => frappe.timeout(0.5),
|
() => frappe.timeout(1),
|
||||||
() => frappe.click_check('Test Employee'),
|
() => frappe.click_button('Check all'),
|
||||||
() => frappe.tests.click_button('Mark Present'),
|
() => frappe.click_button('Mark Present'),
|
||||||
// check if attendance is marked
|
// check if attendance is marked
|
||||||
() => frappe.set_route("List", "Attendance", "List"),
|
() => frappe.set_route("List", "Attendance", "List"),
|
||||||
() => frappe.timeout(1),
|
() => frappe.timeout(1),
|
||||||
() => {
|
() => {
|
||||||
assert.equal("Test Employee", cur_list.data[0].employee_name,
|
assert.deepEqual(["Test Employee 2", "Test Employee 1"], [cur_list.data[0].employee_name, cur_list.data[1].employee_name],
|
||||||
"attendance marked correctly saved");
|
"marked attendance correctly saved for both employee");
|
||||||
assert.equal(attendance_date, cur_list.data[0].attendance_date,
|
let marked_attendance = cur_list.data.filter(d => d.attendance_date == date_of_attendance);
|
||||||
"attendance date is set correctly");
|
assert.equal(marked_attendance.length, 2,
|
||||||
|
'both the attendance are marked for correct date');
|
||||||
},
|
},
|
||||||
() => done()
|
() => done()
|
||||||
]);
|
]);
|
||||||
|
|||||||
37
erpnext/hr/doctype/leave_allocation/test_leave_allocation.js
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
QUnit.module('hr');
|
||||||
|
|
||||||
|
QUnit.test("Test: Leave allocation [HR]", function (assert) {
|
||||||
|
assert.expect(3);
|
||||||
|
let done = assert.async();
|
||||||
|
let today_date = frappe.datetime.nowdate();
|
||||||
|
|
||||||
|
frappe.run_serially([
|
||||||
|
// test creating leave alloction
|
||||||
|
() => frappe.set_route("List", "Leave Allocation", "List"),
|
||||||
|
() => frappe.new_doc("Leave Allocation"),
|
||||||
|
() => frappe.timeout(1),
|
||||||
|
() => frappe.db.get_value('Employee', {'employee_name':'Test Employee 1'}, 'name'),
|
||||||
|
(employee) => cur_frm.set_value("employee", employee.message.name),
|
||||||
|
() => cur_frm.set_value("leave_type", "Test Leave type"),
|
||||||
|
() => cur_frm.set_value("to_date", frappe.datetime.add_months(today_date, 2)), // for two months
|
||||||
|
() => cur_frm.set_value("description", "This is just for testing"),
|
||||||
|
() => cur_frm.set_value("new_leaves_allocated", 2),
|
||||||
|
() => frappe.click_check('Add unused leaves from previous allocations'),
|
||||||
|
// save form
|
||||||
|
() => cur_frm.save(),
|
||||||
|
() => frappe.timeout(1),
|
||||||
|
() => cur_frm.savesubmit(),
|
||||||
|
() => frappe.timeout(1),
|
||||||
|
() => assert.equal("Confirm", cur_dialog.title,
|
||||||
|
'confirmation for leave alloction shown'),
|
||||||
|
() => frappe.click_button('Yes'),
|
||||||
|
() => frappe.timeout(1),
|
||||||
|
// check auto filled from date
|
||||||
|
() => assert.equal(today_date, cur_frm.doc.from_date,
|
||||||
|
"from date correctly set"),
|
||||||
|
// check for total leaves
|
||||||
|
() => assert.equal(cur_frm.doc.carry_forwarded_leaves + 2, cur_frm.doc.total_leaves_allocated,
|
||||||
|
"total leave calculation is correctly set"),
|
||||||
|
() => done()
|
||||||
|
]);
|
||||||
|
});
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
QUnit.module('hr');
|
||||||
|
|
||||||
|
QUnit.test("Test: Leave control panel [HR]", function (assert) {
|
||||||
|
assert.expect(2);
|
||||||
|
let done = assert.async();
|
||||||
|
let today_date = frappe.datetime.nowdate();
|
||||||
|
|
||||||
|
frappe.run_serially([
|
||||||
|
// test leave allocation using leave control panel
|
||||||
|
() => frappe.set_route("Form", "Leave Control Panel"),
|
||||||
|
() => frappe.timeout(1),
|
||||||
|
() => cur_frm.set_value("leave_type", "Test Leave type"),
|
||||||
|
() => cur_frm.set_value("company", "Test Company"),
|
||||||
|
() => cur_frm.set_value("employment_type", "Test Employment Type"),
|
||||||
|
() => cur_frm.set_value("branch", "Test Branch"),
|
||||||
|
() => cur_frm.set_value("department", "Test Department"),
|
||||||
|
() => cur_frm.set_value("designation", "Test Designation"),
|
||||||
|
() => cur_frm.set_value("from_date", frappe.datetime.add_months(today_date, -2)),
|
||||||
|
() => cur_frm.set_value("to_date", frappe.datetime.add_days(today_date, -1)), // for two months [not today]
|
||||||
|
() => cur_frm.set_value("no_of_days", 3),
|
||||||
|
// allocate leaves
|
||||||
|
() => frappe.click_button('Allocate'),
|
||||||
|
() => frappe.timeout(1),
|
||||||
|
() => assert.equal("Message", cur_dialog.title,
|
||||||
|
"leave alloction message shown"),
|
||||||
|
() => frappe.click_button('Close'),
|
||||||
|
() => frappe.set_route("List", "Leave Allocation", "List"),
|
||||||
|
() => frappe.timeout(1),
|
||||||
|
() => {
|
||||||
|
let leave_allocated = cur_list.data.filter(d => d.leave_type == "Test Leave type");
|
||||||
|
assert.equal(2, leave_allocated.length,
|
||||||
|
'leave allocation successfully done for both the employee');
|
||||||
|
},
|
||||||
|
() => done()
|
||||||
|
]);
|
||||||
|
});
|
||||||
22
erpnext/hr/doctype/leave_type/test_leave_type.js
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
QUnit.module('hr');
|
||||||
|
|
||||||
|
QUnit.test("Test: Leave type [HR]", function (assert) {
|
||||||
|
assert.expect(1);
|
||||||
|
let done = assert.async();
|
||||||
|
|
||||||
|
frappe.run_serially([
|
||||||
|
// test leave type creation
|
||||||
|
() => frappe.set_route("List", "Leave Type", "List"),
|
||||||
|
() => frappe.new_doc("Leave Type"),
|
||||||
|
() => frappe.timeout(1),
|
||||||
|
() => cur_frm.set_value("leave_type_name", "Test Leave type"),
|
||||||
|
() => cur_frm.set_value("max_days_allowed", "5"),
|
||||||
|
() => frappe.click_check('Is Carry Forward'),
|
||||||
|
// save form
|
||||||
|
() => cur_frm.save(),
|
||||||
|
() => frappe.timeout(1),
|
||||||
|
() => assert.equal("Test Leave type", cur_frm.doc.leave_type_name,
|
||||||
|
'leave type correctly saved'),
|
||||||
|
() => done()
|
||||||
|
]);
|
||||||
|
});
|
||||||
@@ -367,9 +367,6 @@ def run_production_planning_tool(**args):
|
|||||||
|
|
||||||
return ppt
|
return ppt
|
||||||
|
|
||||||
def create_production_orders(ppt):
|
|
||||||
raise_production_orders(ppt)
|
|
||||||
|
|
||||||
def create_material_requests(ppt):
|
def create_material_requests(ppt):
|
||||||
ppt.raise_material_requests()
|
ppt.raise_material_requests()
|
||||||
|
|
||||||
|
|||||||
@@ -12,8 +12,6 @@ def execute():
|
|||||||
frappe.clear_cache()
|
frappe.clear_cache()
|
||||||
|
|
||||||
def update_hr_permissions():
|
def update_hr_permissions():
|
||||||
from frappe.core.page.user_permissions import user_permissions
|
|
||||||
|
|
||||||
# add set user permissions rights to HR Manager
|
# add set user permissions rights to HR Manager
|
||||||
frappe.db.sql("""update `tabDocPerm` set `set_user_permissions`=1 where parent in ('Employee', 'Leave Application')
|
frappe.db.sql("""update `tabDocPerm` set `set_user_permissions`=1 where parent in ('Employee', 'Leave Application')
|
||||||
and role='HR Manager' and permlevel=0 and `read`=1""")
|
and role='HR Manager' and permlevel=0 and `read`=1""")
|
||||||
|
|||||||
@@ -6,5 +6,5 @@ import frappe
|
|||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
return
|
return
|
||||||
country = get_country_info(country="Turkey")
|
# country = get_country_info(country="Turkey")
|
||||||
add_country_and_currency("Turkey", country)
|
# add_country_and_currency("Turkey", country)
|
||||||
|
|||||||
@@ -3,9 +3,9 @@ import frappe
|
|||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
return
|
return
|
||||||
frappe.reload_doc('website', 'doctype', 'style_settings')
|
# frappe.reload_doc('website', 'doctype', 'style_settings')
|
||||||
style_settings = frappe.get_doc("Style Settings", "Style Settings")
|
# style_settings = frappe.get_doc("Style Settings", "Style Settings")
|
||||||
if not style_settings.apply_style:
|
# if not style_settings.apply_style:
|
||||||
style_settings.update(default_properties)
|
# style_settings.update(default_properties)
|
||||||
style_settings.apply_style = 1
|
# style_settings.apply_style = 1
|
||||||
style_settings.save()
|
# style_settings.save()
|
||||||
|
|||||||
@@ -2,19 +2,19 @@ import frappe
|
|||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
return
|
return
|
||||||
for party_type in ('Customer', 'Supplier'):
|
# for party_type in ('Customer', 'Supplier'):
|
||||||
frappe.reload_doctype(party_type)
|
# frappe.reload_doctype(party_type)
|
||||||
|
#
|
||||||
# set all as default status
|
# # set all as default status
|
||||||
frappe.db.sql('update `tab{0}` set status=%s'.format(party_type), default_status[party_type])
|
# frappe.db.sql('update `tab{0}` set status=%s'.format(party_type), default_status[party_type])
|
||||||
|
#
|
||||||
for doctype in status_depends_on[party_type]:
|
# for doctype in status_depends_on[party_type]:
|
||||||
filters = get_filters_for(doctype)
|
# filters = get_filters_for(doctype)
|
||||||
parties = frappe.get_all(doctype, fields="{0} as party".format(party_type.lower()),
|
# parties = frappe.get_all(doctype, fields="{0} as party".format(party_type.lower()),
|
||||||
filters=filters, limit_page_length=1)
|
# filters=filters, limit_page_length=1)
|
||||||
|
#
|
||||||
parties = filter(None, [p.party for p in parties])
|
# parties = filter(None, [p.party for p in parties])
|
||||||
|
#
|
||||||
if parties:
|
# if parties:
|
||||||
frappe.db.sql('update `tab{0}` set status="Open" where name in ({1})'.format(party_type,
|
# frappe.db.sql('update `tab{0}` set status="Open" where name in ({1})'.format(party_type,
|
||||||
', '.join(len(parties) * ['%s'])), parties)
|
# ', '.join(len(parties) * ['%s'])), parties)
|
||||||
@@ -51,4 +51,4 @@ def check_and_update_auto_email_report(report):
|
|||||||
frappe.delete_doc("Auto Email Report", auto_email_report)
|
frappe.delete_doc("Auto Email Report", auto_email_report)
|
||||||
|
|
||||||
elif report in ["Customer Addresses And Contacts", "Supplier Addresses And Contacts"]:
|
elif report in ["Customer Addresses And Contacts", "Supplier Addresses And Contacts"]:
|
||||||
frapppe.db.set_value("Auto Email Report", auto_email_report, "report", report)
|
frappe.db.set_value("Auto Email Report", auto_email_report, "report", report)
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
{
|
{
|
||||||
"allow_copy": 0,
|
"allow_copy": 0,
|
||||||
|
"allow_guest_to_view": 0,
|
||||||
"allow_import": 1,
|
"allow_import": 1,
|
||||||
"allow_rename": 1,
|
"allow_rename": 1,
|
||||||
"autoname": "field:activity_type",
|
"autoname": "field:activity_type",
|
||||||
@@ -12,6 +13,7 @@
|
|||||||
"editable_grid": 0,
|
"editable_grid": 0,
|
||||||
"fields": [
|
"fields": [
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -22,7 +24,8 @@
|
|||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
"in_list_view": 0,
|
"in_global_search": 0,
|
||||||
|
"in_list_view": 1,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Activity Type",
|
"label": "Activity Type",
|
||||||
"length": 0,
|
"length": 0,
|
||||||
@@ -39,6 +42,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -49,6 +53,7 @@
|
|||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Default Costing Rate",
|
"label": "Default Costing Rate",
|
||||||
@@ -67,6 +72,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -77,6 +83,7 @@
|
|||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"length": 0,
|
"length": 0,
|
||||||
@@ -94,6 +101,7 @@
|
|||||||
"unique": 0
|
"unique": 0
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
"allow_on_submit": 0,
|
"allow_on_submit": 0,
|
||||||
"bold": 0,
|
"bold": 0,
|
||||||
"collapsible": 0,
|
"collapsible": 0,
|
||||||
@@ -104,6 +112,7 @@
|
|||||||
"ignore_user_permissions": 0,
|
"ignore_user_permissions": 0,
|
||||||
"ignore_xss_filter": 0,
|
"ignore_xss_filter": 0,
|
||||||
"in_filter": 0,
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
"in_list_view": 0,
|
"in_list_view": 0,
|
||||||
"in_standard_filter": 0,
|
"in_standard_filter": 0,
|
||||||
"label": "Default Billing Rate",
|
"label": "Default Billing Rate",
|
||||||
@@ -120,20 +129,51 @@
|
|||||||
"search_index": 0,
|
"search_index": 0,
|
||||||
"set_only_once": 0,
|
"set_only_once": 0,
|
||||||
"unique": 0
|
"unique": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"allow_bulk_edit": 0,
|
||||||
|
"allow_on_submit": 0,
|
||||||
|
"bold": 0,
|
||||||
|
"collapsible": 0,
|
||||||
|
"columns": 0,
|
||||||
|
"default": "0",
|
||||||
|
"fieldname": "disabled",
|
||||||
|
"fieldtype": "Check",
|
||||||
|
"hidden": 0,
|
||||||
|
"ignore_user_permissions": 0,
|
||||||
|
"ignore_xss_filter": 0,
|
||||||
|
"in_filter": 0,
|
||||||
|
"in_global_search": 0,
|
||||||
|
"in_list_view": 0,
|
||||||
|
"in_standard_filter": 0,
|
||||||
|
"label": "Disabled",
|
||||||
|
"length": 0,
|
||||||
|
"no_copy": 0,
|
||||||
|
"permlevel": 0,
|
||||||
|
"precision": "",
|
||||||
|
"print_hide": 0,
|
||||||
|
"print_hide_if_no_value": 0,
|
||||||
|
"read_only": 0,
|
||||||
|
"remember_last_selected_value": 0,
|
||||||
|
"report_hide": 0,
|
||||||
|
"reqd": 0,
|
||||||
|
"search_index": 0,
|
||||||
|
"set_only_once": 0,
|
||||||
|
"unique": 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
"has_web_view": 0,
|
||||||
"hide_heading": 0,
|
"hide_heading": 0,
|
||||||
"hide_toolbar": 0,
|
"hide_toolbar": 0,
|
||||||
"icon": "icon-flag",
|
"icon": "icon-flag",
|
||||||
"idx": 1,
|
"idx": 1,
|
||||||
"image_view": 0,
|
"image_view": 0,
|
||||||
"in_create": 0,
|
"in_create": 0,
|
||||||
"in_dialog": 0,
|
|
||||||
"is_submittable": 0,
|
"is_submittable": 0,
|
||||||
"issingle": 0,
|
"issingle": 0,
|
||||||
"istable": 0,
|
"istable": 0,
|
||||||
"max_attachments": 0,
|
"max_attachments": 0,
|
||||||
"modified": "2016-12-13 12:38:18.218618",
|
"modified": "2017-07-25 20:11:05.229092",
|
||||||
"modified_by": "Administrator",
|
"modified_by": "Administrator",
|
||||||
"module": "Projects",
|
"module": "Projects",
|
||||||
"name": "Activity Type",
|
"name": "Activity Type",
|
||||||
@@ -149,11 +189,11 @@
|
|||||||
"export": 1,
|
"export": 1,
|
||||||
"if_owner": 0,
|
"if_owner": 0,
|
||||||
"import": 1,
|
"import": 1,
|
||||||
"is_custom": 0,
|
|
||||||
"permlevel": 0,
|
"permlevel": 0,
|
||||||
"print": 1,
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
|
"restrict": 0,
|
||||||
"role": "System Manager",
|
"role": "System Manager",
|
||||||
"set_user_permissions": 0,
|
"set_user_permissions": 0,
|
||||||
"share": 1,
|
"share": 1,
|
||||||
@@ -175,6 +215,7 @@
|
|||||||
"print": 1,
|
"print": 1,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 1,
|
"report": 1,
|
||||||
|
"restrict": 0,
|
||||||
"role": "Projects User",
|
"role": "Projects User",
|
||||||
"set_user_permissions": 0,
|
"set_user_permissions": 0,
|
||||||
"share": 1,
|
"share": 1,
|
||||||
@@ -196,6 +237,7 @@
|
|||||||
"print": 0,
|
"print": 0,
|
||||||
"read": 1,
|
"read": 1,
|
||||||
"report": 0,
|
"report": 0,
|
||||||
|
"restrict": 0,
|
||||||
"role": "Employee",
|
"role": "Employee",
|
||||||
"set_user_permissions": 0,
|
"set_user_permissions": 0,
|
||||||
"share": 0,
|
"share": 0,
|
||||||
@@ -206,6 +248,8 @@
|
|||||||
"quick_entry": 1,
|
"quick_entry": 1,
|
||||||
"read_only": 0,
|
"read_only": 0,
|
||||||
"read_only_onload": 0,
|
"read_only_onload": 0,
|
||||||
|
"show_name_in_global_search": 0,
|
||||||
"sort_order": "ASC",
|
"sort_order": "ASC",
|
||||||
|
"track_changes": 0,
|
||||||
"track_seen": 0
|
"track_seen": 0
|
||||||
}
|
}
|
||||||
20
erpnext/projects/doctype/activity_type/test_activity_type.js
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
QUnit.test("test: Activity Type", function (assert) {
|
||||||
|
// number of asserts
|
||||||
|
assert.expect(1);
|
||||||
|
let done = assert.async();
|
||||||
|
|
||||||
|
frappe.run_serially([
|
||||||
|
// insert a new Activity Type
|
||||||
|
() => frappe.set_route("List", "Activity Type", "List"),
|
||||||
|
() => frappe.new_doc("Activity Type"),
|
||||||
|
() => frappe.timeout(1),
|
||||||
|
() => frappe.click_link('Edit in full page'),
|
||||||
|
() => cur_frm.set_value("activity_type", "Test Activity"),
|
||||||
|
() => frappe.click_button('Save'),
|
||||||
|
() => frappe.timeout(1),
|
||||||
|
() => {
|
||||||
|
assert.equal(cur_frm.doc.name,"Test Activity");
|
||||||
|
},
|
||||||
|
() => done()
|
||||||
|
]);
|
||||||
|
});
|
||||||
@@ -170,6 +170,7 @@ class Timesheet(Document):
|
|||||||
for data in self.get('time_logs'):
|
for data in self.get('time_logs'):
|
||||||
self.check_workstation_timings(data)
|
self.check_workstation_timings(data)
|
||||||
self.validate_overlap(data)
|
self.validate_overlap(data)
|
||||||
|
validate_activity(data)
|
||||||
|
|
||||||
def validate_overlap(self, data):
|
def validate_overlap(self, data):
|
||||||
if self.production_order:
|
if self.production_order:
|
||||||
@@ -270,6 +271,10 @@ class Timesheet(Document):
|
|||||||
data.billing_amount = data.billing_rate * hours
|
data.billing_amount = data.billing_rate * hours
|
||||||
data.costing_amount = data.costing_rate * hours
|
data.costing_amount = data.costing_rate * hours
|
||||||
|
|
||||||
|
def validate_activity(data):
|
||||||
|
if frappe.get_value('Activity Type', data.activity_type, 'disabled'):
|
||||||
|
frappe.throw(_("Activity type for row {0} is disabled").format(data.idx))
|
||||||
|
|
||||||
@frappe.whitelist()
|
@frappe.whitelist()
|
||||||
def get_projectwise_timesheet_data(project, parent=None):
|
def get_projectwise_timesheet_data(project, parent=None):
|
||||||
cond = ''
|
cond = ''
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ frappe.help.help_links['List/User'] = [
|
|||||||
frappe.help.help_links['permission-manager'] = [
|
frappe.help.help_links['permission-manager'] = [
|
||||||
{ label: 'Role Permissions Manager', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/users-and-permissions/role-based-permissions' },
|
{ label: 'Role Permissions Manager', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/users-and-permissions/role-based-permissions' },
|
||||||
{ label: 'Managing Perm Level in Permissions Manager', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/articles/managing-perm-level' },
|
{ label: 'Managing Perm Level in Permissions Manager', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/articles/managing-perm-level' },
|
||||||
{ label: 'User Permissions Manager', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/users-and-permissions/user-permissions' },
|
{ label: 'User Permissions', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/users-and-permissions/user-permissions' },
|
||||||
{ label: 'Sharing', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/users-and-permissions/sharing' },
|
{ label: 'Sharing', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/users-and-permissions/sharing' },
|
||||||
{ label: 'Password', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/articles/change-password' },
|
{ label: 'Password', url: 'https://frappe.github.io/erpnext/user/manual/en/setting-up/articles/change-password' },
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
<ul class="list-unstyled">
|
<ul class="list-unstyled">
|
||||||
<li><a class="text-muted" href="#">{%= __("Go to the Desktop and start using ERPNext") %}</a></li>
|
<li><a class="text-muted" href="#">{%= __("Go to the Desktop and start using ERPNext") %}</a></li>
|
||||||
<li><a class="text-muted" href="#modules/Learn">{%= __("View a list of all the help videos") %}</a></li>
|
<li><a class="text-muted" href="#modules/Learn">{%= __("View a list of all the help videos") %}</a></li>
|
||||||
<li><a class="text-muted" href="https://frappe.github.io/erpnext/user" target="_blank">{%= __("Read the ERPNext Manual") %}</a></li>
|
<li><a class="text-muted" href="https://erpnext.org/docs/user" target="_blank">{%= __("Read the ERPNext Manual") %}</a></li>
|
||||||
<li><a class="text-muted" href="https://discuss.erpnext.com" target="_blank">{%= __("Community Forum") %}</a></li>
|
<li><a class="text-muted" href="https://discuss.erpnext.com" target="_blank">{%= __("Community Forum") %}</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|||||||
@@ -3,12 +3,12 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<a href="/announcements?announcement={{doc.name}}">
|
<a href="/announcements?announcement={{doc.name}}">
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<h1 class="blog-header">{{ doc.subject }}</h1>
|
<h1>{{ doc.subject }}</h1>
|
||||||
<p class="post-description more">{{ doc.description }}</p>
|
<p class="post-description more">{{ doc.description }}</p>
|
||||||
<p class="post-by text-muted small">
|
<p class="post-by text-muted small">
|
||||||
<i>{{ doc.posted_by }}</i>
|
<i>{{ doc.posted_by }}</i>
|
||||||
<i class="blog-dot"></i> {{ frappe.format_date(doc.modified) }}
|
<i class="spacer-dot"></i> {{ frappe.format_date(doc.modified) }}
|
||||||
<i class="blog-dot"></i> {{ doc.num_attachments }} attachments
|
<i class="spacer-dot"></i> {{ doc.num_attachments }} attachments
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
|||||||
@@ -20,6 +20,9 @@ erpnext/hr/doctype/employment_type/test_employment_type.js
|
|||||||
erpnext/hr/doctype/employee/test_employee.js
|
erpnext/hr/doctype/employee/test_employee.js
|
||||||
erpnext/hr/doctype/employee_attendance_tool/test_employee_attendance_tool.js
|
erpnext/hr/doctype/employee_attendance_tool/test_employee_attendance_tool.js
|
||||||
erpnext/hr/doctype/attendance/test_attendance.js
|
erpnext/hr/doctype/attendance/test_attendance.js
|
||||||
|
erpnext/hr/doctype/leave_type/test_leave_type.js
|
||||||
|
erpnext/hr/doctype/leave_control_panel/test_leave_control_panel.js
|
||||||
|
erpnext/hr/doctype/leave_allocation/test_leave_allocation.js
|
||||||
erpnext/schools/doctype/academic_year/test_academic_year.js
|
erpnext/schools/doctype/academic_year/test_academic_year.js
|
||||||
erpnext/schools/doctype/academic_term/test_academic_term.js
|
erpnext/schools/doctype/academic_term/test_academic_term.js
|
||||||
erpnext/schools/doctype/school_settings/test_school_settings.js
|
erpnext/schools/doctype/school_settings/test_school_settings.js
|
||||||
|
|||||||