Skip to content

Commit

Permalink
[ADD] agriculture: module for agriculture industry
Browse files Browse the repository at this point in the history
  • Loading branch information
vrpa-odoo authored and har-odoo committed Nov 1, 2023
1 parent deb05a9 commit 8db6b96
Show file tree
Hide file tree
Showing 184 changed files with 2,523 additions and 0 deletions.
Empty file added agriculture/__init__.py
Empty file.
63 changes: 63 additions & 0 deletions agriculture/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# -*- coding: utf-8 -*-
{
'name': 'Agricultural Retail',
'version': '1.0',
'category': 'Industry',
'description': """
Tailored setup for agricultural retail businesses engaged in B2B and B2C sales of farming products.
Point of Sale (POS) stores & website offer categorised items such as seeds, pesticides, plant nutrition, and farming equipment.
They utilize a suite of modules including Point of Sale, Inventory, Sales, Purchase, Survey,Accounting, Contact, Dashboard, Barcode, and Documents.
Expanding into the online realm, a website and E-commerce applications can significantly aid their growth in the agricultural retail sector.
""",
'author': 'Agro Farma Industries',
'depends': [
'website_sale_loyalty',
'purchase',
'knowledge',
'pos_sale',
'product_expiry',
'survey',
'crm',
'sale_purchase',
'theme_enark',
],
'data': [
'data/res_config_settings.xml',
'data/ir_actions_server.xml',
'data/ir_attachment_pre.xml',
'data/ir_model_fields.xml',
'data/ir_ui_view.xml',
'data/product_category.xml',
'data/account_analytic_plan.xml',
'data/product_template.xml',
'data/product_pricelist.xml',
'data/product_product.xml',
'data/knowledge_cover.xml',
'data/knowledge_article.xml',
'data/knowledge_article_member.xml',
'data/survey_survey.xml',
'data/survey_question.xml',
'data/survey_question_answer.xml',
],
'demo': [
'demo/res_partner.xml',
'demo/crm_lead.xml',
'demo/product_supplierinfo.xml',
'demo/stock_lot.xml',
'demo/purchase_order.xml',
'demo/purchase_order_line.xml',
'demo/purchase_order_post.xml',
'demo/sale_order.xml',
'demo/sale_order_line.xml',
'demo/sale_order_post.xml',
'demo/website.xml',
'demo/website_views.xml',
'demo/website_page.xml',
'demo/website_menu.xml',
'demo/website_theme_apply.xml',
'demo/website_ir_attachment.xml',
],
'application': False,
'license': 'OPL-1',
}
7 changes: 7 additions & 0 deletions agriculture/data/account_analytic_plan.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo noupdate="1">
<record id="agriculture.account_analytic_plan_1" model="account.analytic.plan">
<field name="name">Default</field>
<field name="color">10</field>
</record>
</odoo>
24 changes: 24 additions & 0 deletions agriculture/data/ir_actions_server.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo>
<record id="action_lead_survey_start" model="ir.actions.server">
<field name="name">lead survey start</field>
<field name="model_id" ref = "crm.model_crm_lead"/>
<field name="state">code</field>
<field name="code"><![CDATA[
if len(records) > 1:
raise UserError("Only start survey for one Lead/Opportunity.")
if records.x_studio_answer:
raise UserError("Survey alrady done, You can create new Lead/Opportunity and take new survey.")
if not records.x_studio_survey:
raise UserError("Survey not selected.")
user_input = records.x_studio_survey._create_answer(user=env.user)
records.write({'x_studio_answer': user_input.id})
action = {
'type': 'ir.actions.act_url',
'name': "Survey",
'target': 'new',
'url': user_input.get_start_url()
}]]></field>
</record>
</odoo>
8 changes: 8 additions & 0 deletions agriculture/data/ir_attachment_pre.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo>
<record id="agriculture.ir_attachment_583" model="ir.attachment">
<field name="name">Agro Covercc.png</field>
<field name="access_token">85e08b16-35c1-42c5-8297-509d1db72cbf</field>
<field name="datas" type="base64" file="agriculture/static/src/binary/ir_attachment/583-AgroCovercc.png"/>
</record>
</odoo>
40 changes: 40 additions & 0 deletions agriculture/data/ir_model_fields.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<odoo>
<record id="agriculture.new_image_product_a139c6d9-d96d-4c75-861b-414fb306f0db" model="ir.model.fields">
<field name="name">x_studio_binary_field_5i7_1h7fiidlo</field>
<field name="model">product.template</field>
<field name="ttype">binary</field>
<field name="model_id" ref="product.model_product_template" />
<field name="field_description">Product Making Story - QR Code</field>
<field name="copied" eval="True" />
<field name="on_delete" eval="False" />
</record>
<record id="agriculture.new_many2one_lead_op_344c7786-d851-4696-9f73-369f3113c8ab" model="ir.model.fields">
<field name="name">x_studio_survey</field>
<field name="ttype">many2one</field>
<field name="model">crm.lead</field>
<field name="model_id" ref="crm.model_crm_lead" />
<field name="field_description">Survey</field>
<field name="copied" eval="True" />
<field name="relation">survey.survey</field>
</record>
<record id="agriculture.new_many2one_lead_op_87033ffe-8507-484a-9e00-589770edbdd9" model="ir.model.fields">
<field name="name">x_studio_answer</field>
<field name="ttype">many2one</field>
<field name="model">crm.lead</field>
<field name="model_id" ref="crm.model_crm_lead" />
<field name="field_description">Answer</field>
<field name="copied" eval="True" />
<field name="relation">survey.user_input</field>
</record>
<record id="agriculture.new_related_field_jo_8adbe86b-b814-45e3-92be-3338ac7c2ba1" model="ir.model.fields">
<field name="name">x_studio_product_story</field>
<field name="ttype">binary</field>
<field name="model">account.move.line</field>
<field name="model_id" ref="account.model_account_move_line" />
<field name="field_description">Product Story</field>
<field name="on_delete" eval="False" />
<field name="readonly" eval="True" />
<field name="related">product_id.x_studio_binary_field_5i7_1h7fiidlo</field>
<field name="store" eval="False" />
</record>
</odoo>
84 changes: 84 additions & 0 deletions agriculture/data/ir_ui_view.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo>
<record id="agriculture.odoo_studio_account__8a0ace7d-f9e4-4599-b5c8-006667d461e2" model="ir.ui.view">
<field name="inherit_id" ref="account.view_move_form"/>
<field name="mode">extension</field>
<field name="model">account.move</field>
<field name="name">Odoo Studio: account.move.form customization</field>
<field name="priority">160</field>
<field name="type">form</field>
<field name="arch" type="xml">
<xpath expr="//form[1]/sheet[1]/notebook[1]/page[@name='aml_tab']/field[@name='line_ids']/tree[1]/field[@name='account_id']" position="after">
<field optional="show" name="x_studio_product_story" widget="image" string="Product Story"/>
</xpath>
</field>
</record>
<record id="agriculture.odoo_studio_crm_lead_3ec59e42-1e61-4b73-b8dd-76c2673f10e0" model="ir.ui.view">
<field name="inherit_id" ref="crm.crm_lead_view_form"/>
<field name="mode">extension</field>
<field name="model">crm.lead</field>
<field name="name">Odoo Studio: crm.lead.form customization</field>
<field name="priority">160</field>
<field name="type">form</field>
<field name="arch" type="xml">
<xpath expr="//field[@name='stage_id']" position="after">
<button name="%(action_lead_survey_start)d" string="Survey Start" class="btn btn-primary" type="action" invisible="x_studio_answer != False"/>
</xpath>
<xpath expr="//form[1]/sheet[1]/group[1]/group[not(@name)][1]/field[@name='tag_ids']" position="after">
<field name="x_studio_survey" string="Survey"/>
<field name="x_studio_answer" string="Answer" invisible="x_studio_answer == False" force_save="True" readonly="1" options="{&quot;no_create&quot;:true,&quot;no_quick_create&quot;:true,&quot;no_create_edit&quot;:true}"/>
</xpath>
</field>
</record>
<record id="agriculture.odoo_studio_product__1213461a-4c6c-40d4-b5aa-4fc0dcf2d4eb" model="ir.ui.view">
<field name="inherit_id" ref="product.product_template_only_form_view"/>
<field name="mode">extension</field>
<field name="model">product.template</field>
<field name="name">Odoo Studio: product.template.product.form customization</field>
<field name="priority">160</field>
<field name="type">form</field>
<field name="arch" type="xml">
<xpath expr="//field[@name='uom_po_id']" position="after">
<field widget="image" name="x_studio_binary_field_5i7_1h7fiidlo" string="Product Making Story - QR Code "/>
</xpath>
</field>
</record>
<record id="agriculture.odoo_studio_stock_pi_2610a694-e60c-4d7b-be2d-721bc7be6b1e" model="ir.ui.view">
<field name="inherit_id" ref="stock.view_picking_form"/>
<field name="mode">extension</field>
<field name="model">stock.picking</field>
<field name="name">Odoo Studio: stock.picking.form customization</field>
<field name="priority">160</field>
<field name="type">form</field>
<field name="arch" type="xml">
<xpath expr="//field[@name='move_line_ids_without_package']" position="inside">
<tree editable="bottom" decoration-muted="(state == 'done' and is_locked == True)">
<field name="product_id" required="1" context="{'default_detailed_type': 'product'}" readonly="state == 'done' or move_id != False"/>
<field name="company_id" invisible="1"/>
<field name="move_id" invisible="1"/>
<field name="picking_id" invisible="1"/>
<field name="product_uom_category_id" invisible="1"/>
<field name="package_id" invisible="1"/>
<field name="result_package_id" invisible="1"/>
<field name="location_id" invisible="1"/>
<field name="location_dest_id" invisible="1"/>
<field name="location_id" options="{'no_create': True}" column_invisible="parent.picking_type_code == 'incoming'" groups="stock.group_stock_multi_locations" domain="[('id', 'child_of', parent.location_id), '|', ('company_id', '=', False), ('company_id', '=', company_id), ('usage', '!=', 'view')]"/>
<field name="location_dest_id" options="{'no_create': True}" column_invisible="parent.picking_type_code == 'incoming'" groups="stock.group_stock_multi_locations" domain="[('id', 'child_of', parent.location_dest_id), '|', ('company_id', '=', False), ('company_id', '=', company_id), ('usage', '!=', 'view')]"/>
<field name="package_id" groups="stock.group_tracking_lot"/>
<field name="result_package_id" groups="stock.group_tracking_lot"/>
<field name="lots_visible" invisible="1"/>
<field name="owner_id" groups="stock.group_tracking_owner" column_invisible="parent.picking_type_code == 'incoming'"/>
<field name="state" invisible="1"/>
<field name="lot_id" groups="stock.group_production_lot" column_invisible="parent.show_lots_text == True" invisible="lots_visible == False" context="{'default_product_id': product_id, 'default_company_id': company_id, 'active_picking_id': picking_id}" optional="show"/>
<field name="is_expired" invisible="1"/>
<button class="fa fa-exclamation-triangle text-danger" title="This lot is expired." string="This lot is expired" disabled="1" invisible="is_expired == False"/>
<field name="lot_name" groups="stock.group_production_lot" column_invisible="parent.show_lots_text == True" invisible="lots_visible == False" context="{'default_product_id': product_id}"/>
<field name="picking_type_use_existing_lots" invisible="1"/>
<field name="expiration_date" force_save="1" readonly="picking_type_use_existing_lots == True"/>
<field name="is_locked" invisible="1"/>
<field name="product_uom_id" force_save="1" readonly="state != 'draft' and id != False" groups="uom.group_uom"/>
</tree>
</xpath>
</field>
</record>
</odoo>
115 changes: 115 additions & 0 deletions agriculture/data/knowledge_article.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo>
<record id="knowledge_article_1" model="knowledge.article">
<field name="inherited_permission">write</field>
<field name="name">Agriculture Retails</field>
<field name="icon">🍀</field>
<field name="cover_image_id" ref="knowledge_cover_6"/>
<field name="is_locked" eval="True"/>
<field name="body"><![CDATA[<p>
<span style="font-size: 36px;"><strong>Agricultural Retail </strong></span>
</p>
<p>
<font color="#343541">
Tailored setup for agricultural retail businesses engaged in B2B and B2C sales of farming products. Point of Sale (POS) stores & website offer categorised items such as seeds, pesticides, plant nutrition, and farming equipment.
</font>
</p>
<p>
<span style="color: rgb(52, 53, 65); font-style: normal; font-weight: 400;">
They utilize a suite of modules including Point of Sale, Inventory, Sales, Purchase, Survey,Accounting, Contact, Dashboard, Barcode, and Documents. Expanding into the online realm, a website and E-commerce applications can
significantly aid their growth in the agricultural retail sector.
</span>
</p>
<div data-oe-protected="true" class="o_knowledge_behavior_anchor o_knowledge_behavior_type_toc">
<div class="o_knowledge_toc_content">
<a href="#" data-oe-nodeid="0" class="oe_unremovable o_no_link_popover d-block o_knowledge_toc_link o_knowledge_toc_link_depth_0">​Setup</a>
<a href="#" data-oe-nodeid="1" class="oe_unremovable o_no_link_popover d-block o_knowledge_toc_link o_knowledge_toc_link_depth_0">​Business Flows </a>
<a href="#" data-oe-nodeid="2" class="oe_unremovable o_no_link_popover d-block o_knowledge_toc_link o_knowledge_toc_link_depth_1">Flow 1: Purchase</a>
<a href="#" data-oe-nodeid="3" class="oe_unremovable o_no_link_popover d-block o_knowledge_toc_link o_knowledge_toc_link_depth_1">Flow 2: Sales from Website (B2B / B2C) </a>
<a href="#" data-oe-nodeid="4" class="oe_unremovable o_no_link_popover d-block o_knowledge_toc_link o_knowledge_toc_link_depth_1">Flow 3: Sales from POS </a>
<a href="#" data-oe-nodeid="5" class="oe_unremovable o_no_link_popover d-block o_knowledge_toc_link o_knowledge_toc_link_depth_1">Flow 4: Opportunity from Website (B2B) and Survey fill</a>
</div>
</div>
<p><br /></p>
<h1>​Setup</h1>
<p>
<font style="color: var(--color) !important;">
<span style="color: var(--color) !important; background-color: transparent; font-weight: 400; font-style: normal; text-decoration: none; font-size: 18px;"><span style="font-size: 14px;">The setup includes:</span></span>
</font>
</p>
<ul>
<li><font style="background-color: inherit;">Pricelists: B2B</font></li>
<li><font style="background-color: inherit;">Expiry date of Lot</font></li>
<li>Discount & Loyalty</li>
<li><font style="background-color: inherit;">Point of Sale </font></li>
<li><font style="background-color: inherit;">Payment Acquire</font></li>
<li>
<font style="background-color: inherit;">Survey - (new button-"</font><font style="background-color: inherit; color: rgb(57, 132, 198);"><strong>Survey Start</strong></font>
<font style="background-color: inherit;">" added through HTML and two fields "</font><font style="color: rgb(255, 214, 99);" class="bg-o-color-4"><strong>Survey</strong></font><font style="background-color: inherit;">", "</font>
<font style="background-color: inherit; color: rgb(255, 214, 99);"><strong>Answer</strong></font>
<font style="background-color: inherit;">
" on Opportunity).<br />
<br />
</font>
</li>
</ul>
<h1>​Business Flows<br /></h1>
<h2 style="margin-bottom: 0px;"><font class="text-o-color-5">Flow 1: Purchase</font></h2>
<p style="margin-bottom: 0px;"><br /></p>
<ul style="margin-bottom: 0px;">
<li>
Create RFQ for product "<font style="color: rgb(57, 132, 198);"><strong>Onion Seeds</strong></font>" for vendor "<span style="color: rgb(57, 132, 198); font-size: 0.9625rem;"><strong>Gloster Organics</strong></span>
<span style="color: rgb(17, 24, 39); font-size: 0.9625rem;">"</span>
</li>
<li>
Create other RFQ for same product with vendor "<font style="color: rgb(57, 132, 198);"><strong>Astron Agro</strong></font>"
</li>
<li>Compare RFQs</li>
<li>Confirm RFQ based on best price</li>
<li><font style="color: var(--color) !important;">Validate the reception for all quantities at once. </font></li>
</ul>
<p><br /></p>
<h2 style="margin-bottom: 0px;">
<font class="text-black"><strong>Flow 2: Sales from Website (B2B / B2C) </strong></font>
</h2>
<p style="margin-bottom: 0px;"><br /></p>
<p>If the Customer is selling their Products from the website.</p>
<p>To do that,</p>
<ul>
<li>Visit Website and choose pricelist</li>
<li>Go to Shop Section and Choose Products</li>
<li>Process Check Out</li>
<li>
Add Promocode "<strong><font style="color: rgb(57, 132, 198);">AGROFARMA10</font></strong>"
</li>
<li>Make Payment<font class="text-o-color-5">​</font></li>
</ul>
<h2 style="margin-bottom: 0px;">Flow 3: Sales from POS</h2>
<p style="margin-bottom: 0px;"><br /></p>
<p style="margin-bottom: 0px;">For Small Products, customers place orders and make payments at the shop.</p>
<p style="margin-bottom: 0px;"><br /></p>
<ul style="margin-bottom: 0px;">
<li>Create a POS order with required product</li>
<li>
Add a Promocode "<font style="color: rgb(57, 132, 198);"><strong>AGROFARMA10</strong></font>"
</li>
<li>Receive Payment</li>
</ul>
<p><br /></p>
<h2 style="margin-bottom: 0px;"><font class="text-black">Flow 4: Opportunity from Website (B2B) and Survey fill</font></h2>
<p style="margin-bottom: 0px;"><br /></p>
<p style="margin-bottom: 0px;">Receive the opportunities through a website. <br /></p>
<p style="margin-bottom: 0px;"><br /></p>
<ul style="margin-bottom: 0px;">
<li>
​Prospect will go to website and fill the "<font style="color: rgb(57, 132, 198);"><strong>Contact us</strong></font>" form.
</li>
<li>Once form is submitted, opportunity will be created in the system.</li>
<li>Sales person visit the farmer and fill survey(According to Farmer's Input).</li>
<li>Sales person shares quotation and confirm the order.</li>
<li>Make Invoice.</li>
</ul>
]]>
</field>
</record>
</odoo>
9 changes: 9 additions & 0 deletions agriculture/data/knowledge_article_member.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo noupdate="1">
<record id="knowledge_article_member1" model="knowledge.article.member">
<field name="partner_id" ref="base.partner_admin"/>
<field name="article_permission">none</field>
<field name="permission">write</field>
<field name="article_id" ref="agriculture.knowledge_article_1"/>
</record>
</odoo>
6 changes: 6 additions & 0 deletions agriculture/data/knowledge_cover.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo>
<record id="agriculture.knowledge_cover_6" model="knowledge.cover">
<field name="attachment_id" ref="agriculture.ir_attachment_583"/>
</record>
</odoo>

0 comments on commit 8db6b96

Please sign in to comment.