Commit Graph

28 Commits

Author SHA1 Message Date
Aditya Hase
f3c22f342c fix(unicode): Import unicode_literals in every file 2019-01-22 18:36:10 +05:30
Tyler Matteson
d14e46ef02 Doctypes in domains that are in beta are now restricted to that domain
non-profit, agriculture, healthcare, hospitality, education

Please enter the commit message for your changes. Lines starting
2018-11-04 08:39:52 -05:00
Shreya Shah
a5add289bb Refactor Naming Series (#15070)
* Patch to create Property Setter for existing naming series

* Update existing naming series options with new

* Add patch link to patches.txt

* Update patch

* Fix codacy

* Fix as per suggestions

* Remove old patch for property setter

* Improve as per suggested

- Modified the naming
- Also refactored naming for doctypes having autoname with series
- Added a patch to make property setter for autoname

* Fix Travis

* Rebase with develop
2018-08-28 13:44:48 +05:30
Zarrar
f579a2bd5d [Minor] Fix Crop Cycle test record (#14901)
* fix crop cycle test record

* load crop cycle doc if not yet loaded

* create test records for location

* land unit -> location , update in patch for tree index
2018-07-15 20:04:24 +05:30
Alchez
df1eae8981 Merge the Land Unit doctype with the Location doctype (#14613)
* Merge Land Unit with the Location doctype

* Fix patch

* [minor] modification to Location structure

- Create a group node "All Land Units" and place all the land units
under it
- Remove "Linked Analysis" from location
2018-07-13 12:50:04 +05:30
Alchez
ca8138fd13 [Agriculture] Sort crop tasks chronologically and optimize disease task creation (#14367)
* Improve max crop period check and sort agriculture tasks chronologically

* Reformat crop cycle logic and add field to optimize task creation
2018-06-08 14:55:07 +05:30
Alchez
eb0ac37587 Fix ISO standard references in Agriculture (#14361) 2018-06-06 10:10:56 +05:30
Suraj Shetty
084b0b3a67 Treeview permission (#14232)
* Replace frappe.db.sql to frappe.get_list to apply permissions (#14037)

* Replace frappe.db.sql to frappe.get_list to apply permission
- All get_children method had frappe.db.sql in them which
had no permission check, now its replaced with frappe.get_list
which will check permission based on the user.

* Fix codacy
- Remove trailing whitespace

* Add parent filter

* Add ifnull checks
2018-05-26 09:12:59 +05:30
Nabin Hait
33df0b4fbf
Test case fixes (#14219)
* Test case fixes

* fetch_from fixes
2018-05-26 09:09:02 +05:30
Achilles Rasquinha
efb731941d ran 2to3, evaluation (#13499)
* ran 2to3, evaluation

* Update update_gstin.py

* Update accounts_receivable_summary.py
2018-05-23 11:31:24 +05:30
Zarrar
c141eb00ee [Enhance] Department added wherever applicable (#14121)
* set All Department as default parent_department

* add department field in employee_transfer

* copied data from options to fetch_from

* add department field wherever employee's link field present

* empty options field where fetch_from is added
2018-05-23 11:11:36 +05:30
Suraj Shetty
fbb6b3da5f Undo replace of frappe.db.sql with frappe.get_list (#14074) 2018-05-16 13:53:31 +05:30
Suraj Shetty
8501010f12 Replace frappe.db.sql to frappe.get_list to apply permissions (#14037)
* Replace frappe.db.sql to frappe.get_list to apply permission
- All get_children method had frappe.db.sql in them which
had no permission check, now its replaced with frappe.get_list
which will check permission based on the user.

* Fix codacy
- Remove trailing whitespace
2018-05-16 10:44:38 +05:30
Charles-Henri Decultot
6860036b01 Agriculture module corrections (#13438)
* Agriculture module corrections

* Update ternary_plot.js
2018-04-02 10:51:53 +05:30
Nabin Hait
c825e914d1
Added indexes for lft, rgt on nestedset doctypes (#13420) 2018-04-02 10:43:46 +05:30
Nabin Hait
2f493731ec Fixed merge conflict 2018-03-12 15:49:59 +05:30
Ameya Shenoy
b34ab7549a fixed subject to task_name (#13278) 2018-03-12 15:24:01 +05:30
Achilles Rasquinha
646522886c self.assertEqual 2018-02-28 21:13:51 +05:30
Nabin Hait
e6d65bc2a1
Fixed translations and tests (#12900)
* Fixed translations and tests

* minor fixes

* minor test fixes
2018-02-14 17:44:06 +05:30
ci2014
58dfc0782f Update agriculture_analysis_criteria.json (#12478) 2018-01-15 12:33:03 +05:30
Saurabh
9579645ae1 [fix] if item code exists then only call get_item_details (#12258) 2018-01-01 16:17:02 +05:30
Ameya Shenoy
3909bd4e9f [agri] Disease task creation on new CropCycle fix (#12131) 2017-12-22 10:58:47 +05:30
Ameya Shenoy
87b7844ae8 [Agri] Item amount set on item set (#12091)
* [Agri] Item amount set on item set

- closes #12008
- fixes #12010

* used frappe.call instead of frm.call in crop

* made modifications for sql query for BOM Item

- done since Crop doctype in Agri module also uses 'BOM Item' child table

* hide BOM no from BOM Item childtable in Crop
2017-12-20 12:00:24 +05:30
Ameya Shenoy
6e5b8bb5d3 fixed logic for creating disease tasks (#12081) 2017-12-19 11:41:10 +05:30
Zarrar
0acf687e20 Land unit tree (#12072)
* improvise tree structure

* remove set intro code

* remove all land units dependency

* test case corrected
2017-12-18 14:01:07 +05:30
Ameya Shenoy
eb8446f01f Agri fixes (#12033)
* crop_cycle, moving point in geojson from js to py

* crop fields are fetched into crop_cycle

- fixes #12011

* area is a readonly field

- fixes #11994

* [agri] land unit child geojson bug fixed

* set_intro null if parent field entered, list only group nodes

* minor fixes
2017-12-16 10:43:35 +05:30
Ameya Shenoy
cc05c0b348 Agri fixes (#11988)
* minor fixes in agri

* updated desktop.py

* [agri] fixed recreation of dotypes in setup.py

* setup_wizard changes

- converted agriculture from alpha to beta
- rearranged the domains alphabetically

* [agri] linked doctype is collapsible
2017-12-13 18:50:39 +05:30
Ameya Shenoy
5c62368a65 [Agriculture Domain] (#11663)
* created Soil Analysis, Water Analysis, Weather and Fertilizer doctype

* soil doctype edited and crop doctype added

* minor stuff

* Land Unit + Leaflet

* crop cycle added

* Land Unit changes + Crop cycle

* autoname for plant_analysis

* created Agriculture Task

* minor stuff

* - deleted agriculture_task
- current state after the call

* [Agriculture] modified fertilizer doctype to have a link to Item
This was done so that the `Fertilizer` doctype could track the contents exclusive to the fertilizer, whereas the `Fertilizer Item` could be a seperate entity, so as to leverage the existing ERPNext doctypes

* Added fields to `Water Analysis` doctype
- Collection Datetime
- Laboratory Testing Datetime
- Results Datetime (default to Laboratory Testing Datetime)

* Edited the doctypes `Agrivulture Task`, `Pest` and `Soil Texture`
- Created `agriculture task` doctype
- added fields `Common Name`, `Scientific Name`, `Treatment` and `Treatment Options` to `Pest` doctype
- edited `Soil Texture` doctype to contain a soil texture ternary plot diagram made using SnapSVG. The code was put in public folder so as to be accessible by the entire agriculture module

* Recursively reflect child land unit feature changes on parents

* fixed feature repition bug

* added legeneds to ternary plot

* added stuff

* changes

* fix Task

* reverted the Task Doctype to have naming in the form TASK.#####

* fixed modifications made to TASK doctype

* [dirty commit] added auto create Task from Crop on creation of Crop Cycle

* Changed the Crop Cycle Doctype
- Deleted the "Crop Cycly Task" doctype and its link from "Crop Cycle"
- Creation of a new Project with the same name as the Crop Cycle on creation of a new Crop Cycle
- Creation of all the tasks imported from Agriculture Task doctype of the Crop in the Crop Cycle

* [Agriculture Module] Modifications
- Created childtable doctype "Pest Detected"
- Added childtable "Pest Detected" to Pest
- Modified "Agriculture Task" to include "Start Day" and "End Day" of task
- Modified the code in "Crop Cycle" to create a parent task with same name as Crop Cycle

* [Agriculture Module] fixed Pest doctype not saving issue

* [Agrcilture Module] Changes in Crop Cycle
- removed the creation of a master task on creation of a new crop cycle
- temporary fix to add the pest tasks from the pests added in crop cycle

* land_unit_tree.js fields modified to have field objects instead of just field names

* Revert "land_unit_tree.js modified"

* land_unit_tree.js fields modified to have field objects instead of just field names

* [Agriculture Domain] Converted Agriculture Module to a Domain
- Converted into a Domain field from Select to Link field in Company doctype, linked to Domain doctype
- Agriculture (alpha) is now a Domain

* land_unit area aggregation enabled

* land_unit.py checks feature diff for every ancestor and not just the parent

* Removed unnecessary print messages

* agriculture.py modified to include fixtures

* fixtures added to setup.py inside agriculture module

* [Agriculture Domain] UI tests added
- 'materials' table renamed to 'materials_required' in 'Crop'
- wrote UI test for Crop, Fertilizer, Crop Cycle, Pest, Water Analysis, Soil Texture
- moved creation of tasks from client side to server side in Crop Cycle
- Plant Analysis, Water Analysis, Soil Analysis, Soil Texture docs are now autonamed in the format PAnalysis.#####, WAnalysis.#####, SAnalysis.#####, STexture.##### respectively
- company_name changed in domains.py from 'Schrute Farms.' to 'Schrute Farms'

* [Agriculture Domain] Mostly written server side tests and moved client side code to server side
- moved client side code to server side for Crop, Water Analysis, Pest, Soil Texture,
- wrote server side tests for Crop, Crop Cycle, Fertilizer, Soil Texture, Pest
- NOTE: none of the server side codes were tested

* [Agriculture Domain] All server side tests working locally

* [Agriculture Domain] Testing
- added sample test for Land Unit, which needs to be modified to test multiple things
- modified tests to be independant of each other

* Land Units tests added and area aggregation code migrated to server side

* added land_unit server side tests and on_trash added to land_unit

* Changing field location for start date

* [Agriculture Domain] deleted unnecessary comments

* [Agriculture Domain] reverted changes

* [Agriculture Domain] Modified the code to replace Pest doctype with Land Unit doctype
- Deleted the Pest doctype and replaced it with the more generic Disease doctype
- Deleted the Detected Pest doctype and replaced it with Detected Disease doctype

* [Agriculture Domain] resolves #11654, resolves #11653

* [Agriculture] Added links to soil analysis, soil texture, plant analysis in crop cycle and land unit
- not working perfectly yet
- docs are fetched but not appended

* [Agricuture] Crop Cycle modifed to link with relevent analysis docs, not fully functional

* [Agriculture] added seperate stage for client side agriculture tests

* [Agriculture] minor modification to crop_cycle.js test

* [Agriculture] fixed tests

* upgrade chromedriver in .travis.yml from 2.32 to 2.33

* [Agriculture] added land unit ui test

* [Agriculture] added Agriculture server side test as a seperate stage in travis

* tesing travis.yml

* [Agriculture] Crop Cycle is able to fetch linked analysis docs

* Modified travis.yml for modular server side testing

* [minor fix][Agriculture] in soil_texture

- fixed multiple soil_texture ternary plot creation on refresh
- fixed error on soil composition change

* Update .travis.yml

* removed location field from linked doctypes

* minor fixes and cleanup of agri

* minor fix in agriculture and domain patches

* permissions added to agriculture

- Agriculture Manager and Agriculture User roles were added to all Agriculture doctypes

* [Agriculture]

- Created Agiculture Analysis Criteria and added sample records to it
- All the analysis doctypes now fetch their fields inside a child table, form Agriculture Analysis Criteria
- Also Fertilizer does the same
  This was introduced so that, new parameters could be added on demand

* minor changes requested in Agriculture

* minor changes

* minor fix

* Update desktop.py

* Update .travis.yml
2017-12-06 18:36:27 +05:30