Skip to content

Commit

Permalink
agriculture: review suggested changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dhrs-odoo committed Feb 26, 2024
1 parent aae274d commit 03a26a6
Show file tree
Hide file tree
Showing 13 changed files with 73 additions and 21 deletions.
3 changes: 2 additions & 1 deletion agriculture/__manifest__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
'name': 'Agricultural Retail',
'version': '1.0',
'category': 'Manufacturing',
'category': 'Retail',
'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.
Expand Down Expand Up @@ -62,4 +62,5 @@
],
'license': 'OPL-1',
'images': ['images/main.png'],
'maintenance_loc': 0,
}
2 changes: 1 addition & 1 deletion agriculture/data/ir_actions_server.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?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="name">Lead Survey Start</field>
<field name="model_id" ref = "crm.model_crm_lead"/>
<field name="state">code</field>
<field name="code"><![CDATA[
Expand Down
4 changes: 2 additions & 2 deletions agriculture/data/ir_model_fields.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
<field name="model_id" ref="crm.model_crm_lead"/>
<field name="field_description">Answer</field>
<field name="relation">survey.user_input</field>
</record>
</record>
<record id="new_related_field_product_story" model="ir.model.fields">
<field name="name">x_product_story</field>
<field name="ttype">binary</field>
<field name="model_id" ref="account.model_account_move_line"/>
<field name="field_description">Product Story</field>
<field name="related">product_id.x_binary_field_product_template</field>
</record>
</record>
</odoo>
13 changes: 6 additions & 7 deletions agriculture/data/knowledge_article.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,10 @@
</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>
<br/>
<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>"
Expand All @@ -76,7 +75,7 @@
<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>
<br/>
<p>If the Customer is selling their Products from the website.</p>
<p>To do that,</p>
<ul>
Expand All @@ -89,9 +88,9 @@
<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>
<br/>
<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>
<br/>
<ul style="margin-bottom: 0px;">
<li>Create a POS order with required product</li>
<li>
Expand All @@ -100,9 +99,9 @@
<li>Receive Payment</li>
</ul>
<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>
<br/>
<p style="margin-bottom: 0px;">Receive the opportunities through a website. <br/></p>
<p style="margin-bottom: 0px;"><br/></p>
<br/>
<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.
Expand Down
4 changes: 2 additions & 2 deletions agriculture/demo/loyalty_program.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo noupdate="1">
<record id="loyalty_program_2" model="loyalty.program">
<field name="name">Discount code</field>
<field name="name">Discount Code</field>
<field name="program_type">promo_code</field>
<field name="trigger">with_code</field>
<field name="date_from" eval="DateTime.today() - relativedelta(days=5)"/>
<field name="date_to" eval="DateTime.today() + relativedelta(days=3)"/>
<field name="date_to" eval="DateTime.today() + relativedelta(days=3)"/>
</record>
</odoo>
12 changes: 12 additions & 0 deletions agriculture/demo/purchase_order.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,16 @@
<record id="purchase_order_1" model="purchase.order">
<field name="alternative_po_ids" eval="[Command.link(ref('purchase_order_2'))]"/>
</record>
<record id="purchase_order_3" model="purchase.order">
<field name="partner_id" ref="res_partner_7"/>
<field name="user_id" ref="base.user_admin"/>
</record>
<record id="purchase_order_4" model="purchase.order">
<field name="partner_id" ref="res_partner_9"/>
<field name="user_id" ref="base.user_admin"/>
</record>
<record id="purchase_order_5" model="purchase.order">
<field name="partner_id" ref="res_partner_10"/>
<field name="user_id" ref="base.user_admin"/>
</record>
</odoo>
12 changes: 12 additions & 0 deletions agriculture/demo/purchase_order_line.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,16 @@
<field name="product_id" ref="product_product_8"/>
<field name="order_id" ref="purchase_order_2"/>
</record>
<record id="purchase_order_line_3" model="purchase.order.line">
<field name="product_id" ref="product_product_10"/>
<field name="order_id" ref="purchase_order_3"/>
</record>
<record id="purchase_order_line_4" model="purchase.order.line">
<field name="product_id" ref="product_product_11"/>
<field name="order_id" ref="purchase_order_4"/>
</record>
<record id="purchase_order_line_5" model="purchase.order.line">
<field name="product_id" ref="product_product_13"/>
<field name="order_id" ref="purchase_order_5"/>
</record>
</odoo>
11 changes: 7 additions & 4 deletions agriculture/demo/purchase_order_post.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,26 @@
ref('purchase_order_line_1')
]"/>
</function>
<record id="cancel_alternative" model="purchase.requisition.alternative.warning">
<record id="purchase_requisition_alternative_1" model="purchase.requisition.alternative.warning">
<field name="alternative_po_ids" eval="[Command.link(ref('purchase_order_2'))]"/>
</record>
<function name="action_cancel_alternatives" model="purchase.requisition.alternative.warning">
<value eval="[
ref('cancel_alternative'),
ref('purchase_requisition_alternative_1'),
]"/>
</function>
<function name="button_confirm" model="purchase.order">
<value eval="[ref('purchase_order_1')]"/>
<value eval="[ref('purchase_order_1'), ref('purchase_order_3'), ref('purchase_order_4'), ref('purchase_order_5')]"/>
</function>

<function name="write" model="stock.move.line">
<value model="stock.move.line" eval="obj().search([('picking_id', '=', obj().env.ref('agriculture.purchase_order_1').picking_ids.id)]).id"/>
<value model="stock.lot" eval="{'lot_id': ref('stock_lot_2'), 'lot_name': obj().env.ref('agriculture.stock_lot_2').name}"/>
</function>
<function name="button_validate" model="stock.picking">
<value model="stock.picking" eval="obj().env.ref('agriculture.purchase_order_1').group_id.stock_move_ids.picking_id.ids"/>
<value model="stock.picking" eval="obj().env.ref('agriculture.purchase_order_1').picking_ids.ids"/>
</function>
<function name="button_validate" model="stock.picking">
<value model="stock.picking" eval="(obj().env.ref('agriculture.purchase_order_1') + obj().env.ref('agriculture.purchase_order_3') + obj().env.ref('agriculture.purchase_order_4') + obj().env.ref('agriculture.purchase_order_5')).picking_ids.ids"/>
</function>
</odoo>
2 changes: 1 addition & 1 deletion agriculture/demo/res_partner.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<record id="res_partner_10" model="res.partner">
<field name="name">Shailendra Rathod(SRA)</field>
<field name="email">sra@example.com</field>
<field name="phone">9876543210</field>
<field name="phone">+33 0144195000</field>
<field name="street">Street -1</field>
<field name="street2">Street -2</field>
<field name="zip">190293</field>
Expand Down
12 changes: 12 additions & 0 deletions agriculture/demo/sale_order.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,16 @@
<field name="partner_id" ref="res_partner_9"/>
<field name="user_id" ref="base.user_admin"/>
</record>
<record id="sale_order_3" model="sale.order">
<field name="partner_id" ref="res_partner_7"/>
<field name="user_id" ref="base.user_admin"/>
</record>
<record id="sale_order_4" model="sale.order">
<field name="partner_id" ref="res_partner_8"/>
<field name="user_id" ref="base.user_admin"/>
</record>
<record id="sale_order_5" model="sale.order">
<field name="partner_id" ref="res_partner_7"/>
<field name="user_id" ref="base.user_admin"/>
</record>
</odoo>
15 changes: 15 additions & 0 deletions agriculture/demo/sale_order_line.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,19 @@
<field name="order_id" ref="sale_order_1"/>
<field name="is_delivery" eval="True"/>
</record>
<record id="sale_order_line_7" model="sale.order.line">
<field name="name">Multi Fruit Fertilizer is a specialized agricultural product designed to enhance the growth and yield of various types of fruits. Formulated with a balanced blend of essential nutrients, minerals, and organic compounds, this fertilizer supports the unique nutritional requirements of different fruit crops. Its innovative composition promotes healthy root development, robust plant growth, and improved fruit quality. By providing a comprehensive solution for multiple fruit varieties, Multi Fruit Fertilizer contributes to increased productivity and overall crop success in orchards and gardens.</field>
<field name="product_id" ref="product_product_11"/>
<field name="order_id" ref="sale_order_3"/>
</record>
<record id="sale_order_line_8" model="sale.order.line">
<field name="name">Fast Root Fertilizer is a potent and specialized formula designed to promote rapid root development in plants. Packed with essential nutrients and growth stimulants, this fertilizer accelerates the establishment of strong and healthy root systems, enhancing overall plant growth and vitality.</field>
<field name="product_id" ref="product_product_10"/>
<field name="order_id" ref="sale_order_4"/>
</record>
<record id="sale_order_line_9" model="sale.order.line">
<field name="name">The Soil Activator is a natural solution that boosts soil health and plant growth. Packed with beneficial microorganisms and nutrients, it revitalizes the soil ecosystem, promoting better nutrient absorption and stronger, more vibrant plants.</field>
<field name="product_id" ref="product_product_13"/>
<field name="order_id" ref="sale_order_5"/>
</record>
</odoo>
2 changes: 1 addition & 1 deletion agriculture/demo/sale_order_post.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo>
<!-- Confirm action -->
<function name="action_confirm" model="sale.order" eval="[[ref('sale_order_1'), ref('sale_order_2')]]"/>
<function name="action_confirm" model="sale.order" eval="[[ref('sale_order_1'), ref('sale_order_2'), ref('sale_order_3'), ref('sale_order_4'), ref('sale_order_5')]]"/>

<function name="button_validate" model="stock.picking" context="{'skip_sms': True}">
<value model="stock.picking" eval="obj().env.ref('agriculture.sale_order_1').picking_ids.ids"/>
Expand Down
2 changes: 0 additions & 2 deletions agriculture/demo/stock_lot.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
<field name="name">LOT0001</field>
<field name="product_id" ref="product_product_12"/>
<field name="location_id" ref="stock.stock_location_stock"/>
<field name="product_expiry_reminded" eval="True"/>
</record>
<record id="stock_lot_2" model="stock.lot">
<field name="name">Lot001</field>
<field name="product_id" ref="product_product_8"/>
<field name="product_expiry_reminded" eval="True"/>
</record>
</odoo>

0 comments on commit 03a26a6

Please sign in to comment.