Code Monkey home page Code Monkey logo

agriculture's Introduction

a web framework with "batteries included"

it's pronounced - fra-pay

Full-stack web application framework that uses Python and MariaDB on the server side and a tightly integrated client side library. Built for ERPNext.

Login for the PWD site: (username: Administrator, password: admin)

Table of Contents

Installation

Production

Development

Contributing

  1. Code of Conduct
  2. Contribution Guidelines
  3. Security Policy

Resources

  1. frappeframework.com - Official documentation of the Frappe Framework.
  2. frappe.school - Pick from the various courses by the maintainers or from the community.
  3. buildwithhussain.dev - Watch Frappe Framework being used in the wild to build world-class web apps.

License

This repository has been released under the MIT License.

By contributing to Frappe, you agree that your contributions will be licensed under its MIT License.

agriculture's People

Contributors

aahmd970 avatar achillesrasquinha avatar adityahase avatar alchez avatar ankush avatar aureliamaeve avatar chdecultot avatar chillaranand avatar ci2014 avatar codingcoffee avatar deepeshgarg007 avatar hrwx avatar marination avatar mohsinalimat avatar nabinhait avatar ruchamahabal avatar sagarvora avatar saurabh6790 avatar scmmishra avatar shariquerik avatar shreyashah115 avatar surajshetty3416 avatar walstanb avatar zlash65 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

agriculture's Issues

[WIP] Agricultural Location and Warehouse relationships

A Location needs to have an associated or linked Warehouse. Any crops or animals that is registered as present in a location, has to appear also as an item in the warehouse associated to it, to properly register accounting value.

  • Add Warehouse link field to Location doctype.

  • Add functionality to create a new Warehouse when creating a new Location for Agriculture module, if user does not specify an existing warehouse.

  • Add a default warehouse parent for creating agricultural locations in Agriculture Settings page.

New DocType Animal Group and Tree View

Challenge:
ERPNext needs to track individual animals as well as unserialized animals. Both these categories need to be assigned to a group so operations and data can be performed on them. Information needs to be visible in Tree view in ERPNext, so totals can be quickly gleaned from data displayed on screen.

Planned Solution:
A DocType called Animal Group will be created. Within it, the user will be able to view the following:

  • A link field specifying the parent Animal Group (if Any) it will default to "All Animal Groups" as the root

  • A section named Unserialized Group Members which will show a Child Table with the following fields:

  • amount

  • species

  • combined weight

  • date added to group

The total weight for all animals (rows) in child table of unserialized group members will also be displayed. (similar to a sales invoice Grand total read only field)

  • A section named Serialized Group Members which will show a Child Table of all the individual animals in inventory belonging to the group being viewed.

  • ID

  • Name

  • Species

  • Weight

  • Date added to group

The total weight for all individual members (rows) in child table of serialized group members will also be displayed below the child table (similar to a sales invoice Grand total read only field)

  • A grand total weight field will be shown combining the total weight of unserialized + total weight of serialized

  • When viewing DocType in list view, a link to a tree view will be available, which will show the groups as folders, and the individuals (serialized and unserialized) as nodes.

  • Each node will display the weight for each individual, in a specified UOM in Ag Settings page.

  • Each group or folder will display the combined weight of all the members of that group (serialized and unserialized). Similar to the Accounting Tree view where total balance per account and per group of accounts is shown.

Expected Behavior:

Agriculture Module

hi
1-the crop cycle must create a planned project and then the actual or confirmed projects created from the planned projects ,
the benefits of this to compare between the plan and its related actual project. the comparison at two levels ,1-Cost,income and gross margin 2- rates and quantities of all items related to the tasks .
2-material Issue must be related to the tasks .

  • the cost of any task = material cost + labor cost + machine cost
  • the project tasks must have all of its data (Material + Costs ) form the crop.
  • Crop ,location and any custom fields in the crop cycle must appear in the project and also the tasks.

Thanks in advance.

Add functionality to recalculate weight on server and display in tree view

For these new doctypes pending PR and approval:
New DocType Animal Group and Tree View frappe/erpnext#15209

The functionality we developed depends on each Animal Group being opened and saved for proper weight calculations to occur, given serialized animal group members whose weight instances update each time the doctype is opened and saved. Thus, when observing in tree view, the weights shown are the total weights for the group when user last opened that animal group in ERPNext and refreshed resaved it. This can eventually lead to incorrect data if too many animal groups exist.

The proposed functionality will enable the same calculations run by animal group doctype on the server, to occur every time the tree view for animal group is loaded, this ensures data consistency, and guarantees that the displayed data is the most up to date.

This problem happens because serialized animals can have individual weights, and only the last weight instance is considered when loading, refreshing and re-saving the animal group doctype.
@monroy95

Crop Disease list

Diseases already created must be added to the crop as their Disease Phenology.
Diseases can come in these categories,

Animalia
Arthropoda
Fungi
Bacteria
Fitotoxicity

Each disease has different treatments and thus suggested treatments can be offered to user whenever a disease detection occurs, depending on the point in the cycle of plant growth (its phenology)

Setup Wizard view for Agri-Farm ERPNext

To simplify the initial setup for Agri-farm ERPNext, I am proposing we design a view that extends from the Setup Wizard, where the user enters minimum required information to properly operate the Agriculture module. This should be a conditional extension of the actual initial ERPNext setup.

As the user is setting up his ERPNext account using the standard Setup Wizard, when the setup wizard requests the Domain of the business, one of the options should be Agriculture. Given this selection, at some point in the setup wizard, the steps below are added:
[] 2. Select your Crops (or Livestock)
[] 3. Create Land units (geographic location, plots, etc.)

The Select your Crops View should allow the user to select from a pre-loaded list of crops, where many crops are selected at one time.
[] draft a list of crops

The land unit creation should show a leaflet map where the first location is entered in one of three forms: A single location pin, a polygon, a textual reference or address. The map, ideally, should pre-center itself based on the device's location. For example, if the setup is being conducted on a mobile phone, the map should center and zoom at the device's location. This will not apply in all cases, but for a farmer in the field this simplifies setup. A farmer who is physically located elsewhere, setting up ERPNext, can then use the leaflet map to enter an address or drag and zoom as required.

Once this initial setup is finished, the agri-farm ERPNext Icon should be configured to go on the desk view.

Crop Growth Cycles

  • Allow user to define the different stages of crop growth and days from planting, such as:
    Based on: Plant Growth Stages
  1. Sprout
  2. Seedling
  3. Vegetative
  4. Budding
  5. Flowering
  6. Ripening
  • The stages will default to 6 in a child table, however the user can add additional stages as desired throughout the entire crop cycle. Each stage will have an associated Item created, to reflect accurately what is located in a warehouse at any moment

the expected functionality is that ERPNext will automatically remove the previous stock items and add new items representing the plant growth phase.

Error while get-app : bench.exceptions.InvalidRemoteException

When I tried to clone agriculture app on my local server i got following error with this command: bench get-app agriculture

furqan@root:~/frappe-bench-dev/apps$ bench get-app agriculture 
WARN: bench is installed in editable mode!

This is not the recommended mode of installation for production. Instead, install the package from PyPI with: `pip install frappe-bench`

ERROR: 
Traceback (most recent call last):
  File "/home/furqan/.local/lib/python3.8/site-packages/bench/utils/__init__.py", line 416, in fetch_details_from_tag
    org, repo = org_repo
ValueError: not enough values to unpack (expected 2, got 1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/furqan/.local/bin/bench", line 8, in <module>
    sys.exit(cli())
  File "/home/furqan/.local/lib/python3.8/site-packages/bench/cli.py", line 121, in cli
    raise e
  File "/home/furqan/.local/lib/python3.8/site-packages/bench/cli.py", line 111, in cli
    bench_command()
  File "/home/furqan/.local/lib/python3.8/site-packages/click/core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "/home/furqan/.local/lib/python3.8/site-packages/click/core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "/home/furqan/.local/lib/python3.8/site-packages/click/core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/furqan/.local/lib/python3.8/site-packages/click/core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/furqan/.local/lib/python3.8/site-packages/click/core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "/home/furqan/.local/lib/python3.8/site-packages/bench/commands/make.py", line 142, in get_app
    get_app(
  File "/home/furqan/.local/lib/python3.8/site-packages/bench/app.py", line 308, in get_app
    app = App(git_url, branch=branch, bench=bench)
  File "/home/furqan/.local/lib/python3.8/site-packages/bench/app.py", line 148, in __init__
    super().__init__(name, branch, *args, **kwargs)
  File "/home/furqan/.local/lib/python3.8/site-packages/bench/app.py", line 65, in __init__
    self.setup_details()
  File "/home/furqan/.local/lib/python3.8/site-packages/bench/app.py", line 91, in setup_details
    self._setup_details_from_name_tag()
  File "/home/furqan/.local/lib/python3.8/site-packages/bench/app.py", line 97, in _setup_details_from_name_tag
    self.org, self.repo, self.tag = fetch_details_from_tag(self.name)
  File "/home/furqan/.local/lib/python3.8/site-packages/bench/utils/__init__.py", line 418, in fetch_details_from_tag
    org, repo = find_org(org_repo)
  File "/home/furqan/.local/lib/python3.8/site-packages/bench/utils/__init__.py", line 400, in find_org
    raise InvalidRemoteException
bench.exceptions.InvalidRemoteException

Cloned successfully VIA this : bench get-app https://github.com/frappe/agriculture

furqan@root:~/frappe-bench-dev/apps$ bench --site site.local-dev install-app agriculture 
WARN: bench is installed in editable mode!

This is not the recommended mode of installation for production. Instead, install the package from PyPI with: `pip install frappe-bench`

Could not find app "agriculture"
furqan@root:~/frappe-bench-dev/apps$ bench get-app https://github.com/frappe/agriculture
WARN: bench is installed in editable mode!

This is not the recommended mode of installation for production. Instead, install the package from PyPI with: `pip install frappe-bench`

Getting agriculture
$ git clone https://github.com/frappe/agriculture  --depth 1 --origin upstream
Cloning into 'agriculture'...
remote: Enumerating objects: 125, done.
remote: Counting objects: 100% (125/125), done.
remote: Compressing objects: 100% (92/92), done.
remote: Total 125 (delta 36), reused 75 (delta 27), pack-reused 0
Receiving objects: 100% (125/125), 46.03 KiB | 596.00 KiB/s, done.
Resolving deltas: 100% (36/36), done.
Installing agriculture
$ /home/furqan/frappe-bench-dev/env/bin/python -m pip install --quiet --upgrade -e /home/furqan/frappe-bench-dev/apps/agriculture 
$ bench build --app agriculture
✔ Application Assets Linked                                                                                                                           


yarn run v1.22.17
$ node esbuild --production --apps agriculture --run-build-command
File                                                        Size

 DONE  Total Build Time: 472.804ms

clean: postcss.plugin was deprecated. Migration guide:
https://evilmartians.com/chronicles/postcss-8-plugin-migration
clean: postcss.plugin was deprecated. Migration guide:
https://evilmartians.com/chronicles/postcss-8-plugin-migration
clean: postcss.plugin was deprecated. Migration guide:
https://evilmartians.com/chronicles/postcss-8-plugin-migration
clean: postcss.plugin was deprecated. Migration guide:
https://evilmartians.com/chronicles/postcss-8-plugin-migration
 WARN  Cannot connect to redis_cache to update assets_json
 WARN  Cannot connect to redis_cache to update assets_json
 WARN  Cannot connect to redis_cache to update assets_json
Done in 17.65s.

But again got Error while installing app on site: bench --site site.local-dev install-app agriculture

furqan@root:~/frappe-bench-dev/apps$ bench --site site.local-dev install-app agriculture 
WARN: bench is installed in editable mode!

This is not the recommended mode of installation for production. Instead, install the package from PyPI with: `pip install frappe-bench`

An error occurred while installing agriculture: 
Traceback (most recent call last):
  File "apps/frappe/frappe/installer.py", line 173, in fetch_details_from_tag
    org, repo = org_repo
ValueError: not enough values to unpack (expected 2, got 1)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "apps/frappe/frappe/commands/site.py", line 344, in install_app
    _install_app(app, verbose=context.verbose)
  File "apps/frappe/frappe/installer.py", line 223, in install_app
    name = parse_app_name(name)
  File "apps/frappe/frappe/installer.py", line 203, in parse_app_name
    _, repo, _ = fetch_details_from_tag(name)
  File "apps/frappe/frappe/installer.py", line 175, in fetch_details_from_tag
    org, repo = find_org(org_repo[0])
  File "apps/frappe/frappe/installer.py", line 149, in find_org
    raise InvalidRemoteException
frappe.exceptions.InvalidRemoteException

Bench Version

furqan@root:~/frappe-bench-dev/apps$ bench --version
5.7.6
INFO: A newer version of bench is available: 5.7.6 → 5.8.1

Apps Version

furqan@root:~/frappe-bench-dev/apps$ bench version
WARN: bench is installed in editable mode!

This is not the recommended mode of installation for production. Instead, install the package from PyPI with: `pip install frappe-bench`

agriculture 0.0.1
erpnext 13.x.x-develop
frappe 14.x.x-develop

Water Analysis Doctype

  • pH
  • Conductivity (mS/cm i.e. millisiemens/cm)
  • Hardness (mg/CaCO3)
  • Turbidity (NTU)
  • Odor
  • Color
  • Nitrate (mg/L)
  • Nitrite (mg/L)
  • Calcium (mg/L)
  • Magnesium (mg/L)
  • Sulphate (mg/L)
  • Boron (mg/L)
  • Copper (mg/L)
  • Iron (mg/L)
  • Manganese (mg/L)
  • Zinc (mg/L)
  • Chlorine (mg/L)
  • Location (from where the sample was taken)
  • Timestamp
  • Type of sample
  • Container
  • Origin (tap, river, etc..)
  • Temperature (at the time of collection)
  • Temperature (storage)
  • Appearance
  • Person Responsible

Weather Doctype

  • Date
  • Source (Outside/ Local)
  • Temperature
    • High
    • Low
    • Average
  • Dew Point
  • Precipitation Received
  • Humidity
  • Pressure
  • Insolation/ PAR (Photosynthetically Active Radiation)
  • Degree Days

Planting Agricultural Work Functionality

  • Add child table named Agricultural Work Planting Item with these columns:
  1. Items
  2. stock_qty
  3. stock_qty_uom
  4. qty
  5. uom
  6. conversion_factor
  7. origin_warehouse: link to warehouse
  • Automatically suggest the origin warehouse based on the default mentioned in item, then by lowest stock amount, then by next highest available stock amount.

  • Upon validation or submittal, a Stock Ledger entry is registered, reducing the amount of items directly planted, correctly from origin warehouse.

Food Safety System control points.

#Expected Behavior
Provide a module for tracking compliance with certification labels/programs for a farm.

  1. Add a certification agency (which is a supplier)
  2. Add certification protocols (protocols can be assigned to many certification agencies
  3. Add certification evaluation of type internal or external or official. Points are given as per each certification protocol.
  4. Certification is valid for specific dates. Warnings are given as required by ERPNext to prepare for evaluations: a set number of internal evaluations for compliance prior to the next official external evaluation

Systems Proposed (I'm sure users can provide more certification systems and these could be added by user as necessary, for those new certifications created post software development.)
National Organic Program - NOP (aka: USDA Organic)
EU Organic Regulations - (Responsible Agency) and organic stakeholders of the EU decision makers
EUREPGAP /GLOBALGAP
Alsi system
Nestle NQS
DS 3026
Kraft Food system
Dutch HACCP
Irish HACCP
McDonald's System

Carbon Offset calculations in ERPNext Ag module

Boilerplate issue: Must add carbon credit functionality to ERPNext Ag Module

  1. Add carbon certificate DocType
  2. Add transaction /accounting for this instrument
  3. Link to location and/or crop cycle

Agriculture Module Settings - User defined UOM conversion table

During development of DocTypes, there are certain items that can probably be set globally from the settings page for Agriculture Module.

One of those ideas is to have a table where the user can specify conversions to apply given specific UOM. So, for example, user has two UOM that user created in ERPNext named "Pound" and another named "Kilogram". User should be able to select the conversion rate and enter his conversion units as 1 Kilogram = 2.204622622 Pounds.
User can enter his own values to reflect regional customs, because
The list should have no limit of unit conversions user desires. If "Kilogram" and "Pound" are already linked in this manner, then the inverse should be true (except for temperature, which involves functions!)

agriculture *

  • the crop cycle must create a planned project and then the actual or confirmed projects created from the planned projects ,
    the benefits of this to compare between the plan and its related actual project. the comparison at two levels ,1-Cost,income and gross margin 2- rates and quantities of all items related to the tasks .

  • material Issue must be related to the tasks .

  • the cost of any task = material cost + labor cost + machine cost

  • the project tasks must have all of its data (Material + Costs ) form the crop.

  • Crop , location and any custom fields in the crop cycle must appear in the project and also the tasks.
    Thanks in advance.

Weekly recurring crop cycles in agriculture domain?

A feature request for the crop cycle section of the agriculture domain to include weekly, recurring cycles for crops.

We are a horticultural business growing microgreens and mushrooms in poly tunnels and indoor grow rooms. We have weekly, recurring, planting schedules for our microgreen varieties (currently managed with https://kanboard.org/ project management software) with a fixed Wednesday day of harvest and packing every week of the year. Start dates of planting change over the season in line with the changes in temperature and humidity and are manually changed using a gantt chart. Some crops have a Date To Maturity (DTM) of 5 days in summer which then lengthens to 10 days in winter.

It would be great to be able to able to only enter one crop cycle per variety of greens (mustard, sunflower, radish etc etc) per year and have it re generate the next cycle with the same fixed harvest date but have me able to enter the start date manually. This is a common need of market gardeners who need to change their start dates of planting during the year but keep their harvest dates the same to accommodate their markets. A simple task list for the week would then indicate the crops (including amounts, number of seedling trays etc etc) to plant on which day.

Currently I can only create one crop cycle with a given name (eg. Red Radish_001) because I can't have multiple projects with the same name. I could rename every consecutive crop cycle for Red Radish with a _002, _003 etc suffix which would then create 52 projects numbering Red Radish_001--> Red Radish_0052. This would then duplicate all the tasks for Red Radish_001 into all the subsequent projects. I would then have to manually set all the end dates to every Wednesday of the year......... and so it goes on for every variety....... So, maybe this functionality would be better implemented in the Projects domain instead, as a crop cycle seems to be just a project anyway? Recurring tasks in projects a la kanboard.org.

I know this may be low on the priority list, if on the radar at all and I appreciate the hard work you guys have done and are doing! Cheers.

Restaurant Order Entry Suggestion

Hello Team,

Below are our suggestions and that would be good if we can implement likewise.

Current flow: When any restaurant order entry added and the user clicks on update button and sales invoice will be generated in the background with Draft status.

Problem with the current flow is if the customer has placed the order first time and after some time he want's to order another menu items then restaurant sales user have to update that order entry from sales invoice. So here I suggest when we place first time order then save it that voucher into restaurant order entry itself. Currently, it is single doctype so make it like save submit a document.

So here sales user can update the order and when payment raise it will submit the order entry and then sales invoice auto generate in the background with paid status.

Also Please add Employee with employment type = "Sales" In restaurant order entry so we get an idea which sales user have handled that restaurant table.

Also, you can trigger ERPNext feedback functionality after the user has paid the invoice so it's really helpful for the restaurant.

Otherwise, I liked your efforts for this application. If you need any help from us feel free to tell us or drop an email at my email ID ( [email protected] ).

Thanks.

New DocType Crop Inventory Item Template

  • Add template for Crop Inventory Item similar to sales taxes and charges, where the default crop inventory items, schedule and valuations are defined previously by user and can be selected.

  • User specifies Template Code once for Items.

  • Crop, once created /saved with selected Crop Inventory Item, creates the Template and Variants automatically, given the selected option to create.

Pest Doctype

  • Contains list of various types of Pests and measures to be taken to control them

[WIP] Add Work doctype for recording crop cycle operations

ERPNext-Agri-Community/erpnext-agri#3

As I was working on the Fertilizer Application or Pesticide Application, it dawned on me that we can simplify greatly by having a SINGLE DocType which handles all the functionality for these types of work:

Planting
Transplanting / moving animals
Doing field work on the plants/ field / animals
Applying Fertilizer / feeding
Applying Pesticides / medication
Harvesting
Post-harvest work
Work Done
Each of the above should belong to a Work Done DocType, and upon opening, the farmer selects:
a. Crop Cycle or Life Cycle (or herd)
b. Specific Crop Cycle or Life Cycle
c. Work Type (as above)
d. Date

The selections made in these four fields, enable or disable those child tables relevant to the type of work being done. A harvest does not involve the application of pesticides.

Fertiliser Doctype

list of fertilisers available

  • Name
  • density if liquid (so that we can accurately calculate the weight of the required actual element)
  • N
  • P
  • K
  • Ca
  • S
  • Mg
  • Fe
  • Cu
  • Zn
  • B
  • Mn
  • Cl
  • Mo
  • Na
  • Humic acid
  • Fumic acid
  • Inert

Soil Analysis Doctype

  • date
  • depth
  • pH
  • salt concentration (%)
  • organic matter (%)
  • CEC (cation exchange capacity) (MAQ/100mL)
  • Potassium saturation (%)
  • Calcium saturation (%)
  • Manganese saturation (%)
  • Nitrogen (ppm)
  • Phosphorous (ppm)
  • Potassium (ppm)
  • Calcium (ppm)
  • Magnesium (ppm)
  • Sulphur (ppm)
  • Copper (ppm)
  • Iron (ppm)
  • Manganese (ppm)
  • Zinc (ppm)
  • Aluminium (ppm)
  • Auto calculated fields
    • Ca/K
    • Ca/Mg
    • Mg/K
    • (Ca+Mg)/K
    • Ca/(K+Ca+Mg)
  • Invoice number

(AGRICULTURE) Allow to link a Agricultural Location to a Cost Center

Hi, this is some way related to https://github.com/frappe/erpnext/issues/15118

I want to proposal to add allow to link a Location with a Cost Center.

Proposed Use Case

ABC Farms have to 2 diferent locations, the manage of the company want to know how much is spending in any of the locations, a easy way to know it is to have a separate Cost Center linked to a location, this way we can have the information about espenses per Cost Center in Accountins reports.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.