Skip to content

Commit

Permalink
wip - cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
paso-odoo committed Dec 29, 2023
1 parent 15e9762 commit 9ae5b11
Show file tree
Hide file tree
Showing 10 changed files with 34 additions and 123 deletions.
4 changes: 1 addition & 3 deletions commodity_trading/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
'version': '1.0',
'category': 'Services',
'description': """
Tailored for commodity traders (e.g., soybeans, wheat) with comprehensive functions,
Tailored for commodity traders (e.g. soybeans, wheat) with comprehensive functions,
including CRM, quality checks, and broker involvement for product quality and commissions.
""",
'author': 'Odoo S.A.',
'depends': [
'account_followup',
'appointment_crm',
Expand Down Expand Up @@ -65,7 +64,6 @@
'demo/sale_order_line.xml',
'demo/sale_order_post.xml',
],
'application': False,
'license': 'OPL-1',
'images': ['images/main.png'],
}
2 changes: 1 addition & 1 deletion commodity_trading/data/ir_model_fields.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<field name="model_id" ref="stock_picking_batch.model_stock_picking_batch"/>
<field name="field_description">Net Weight</field>
<field name="ttype">float</field>
<field name="compute">for record in self:record['x_net_weight'] = record.x_gross_weight-record.x_weight</field>
<field name="compute"><![CDATA[for record in self:record['x_net_weight'] = record.x_gross_weight-record.x_weight]]></field>
<field name="depends">x_gross_weight,x_weight</field>
<field name="readonly" eval="True"/>
</record>
Expand Down
67 changes: 3 additions & 64 deletions commodity_trading/data/ir_ui_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@
<field name="type">form</field>
<field name="arch" type="xml">
<form>
<header/>
<sheet string="Weighing Scale/GRN Details">
<widget name="web_ribbon" text="Archived" bg_color="text-bg-danger" invisible="x_active == True"/>
<field name="x_active" invisible="1"/>
Expand Down Expand Up @@ -193,7 +192,6 @@
<field name="type">form</field>
<field name="arch" type="xml">
<data>
<!-- TODO: Need to shorter xpath -->
<xpath expr="//page[@name='inventory']/group[2]/field" position="inside">
<!-- <xpath expr="/form[1]/sheet[1]/notebook[1]/page[5]/group[2]/field[1]" position="inside">-->
<tree string="Product Packagings" name="packaging" editable="bottom">
Expand Down Expand Up @@ -321,60 +319,6 @@
</data>
</field>
</record>
<!-- TODO: it is needed? -->
<!-- <record id="view_picking_form_inherit_commodity_trading" model="ir.ui.view">-->
<!-- <field name="name">stock.picking.form.customization.commodity.trading</field>-->
<!-- <field name="mode">extension</field>-->
<!-- <field name="model">stock.picking</field>-->
<!-- <field name="inherit_id" ref="stock.view_picking_form"/>-->
<!-- <field name="priority">10000</field>-->
<!-- <field name="type">form</field>-->
<!-- <field name="arch" type="xml">-->
<!-- <data>-->
<!-- &lt;!&ndash; TODO: reduce xpath &ndash;&gt;-->
<!-- <xpath expr="/form[1]/sheet[1]/notebook[1]/page[1]/field[1]" position="inside">-->
<!-- <form string="Move Lines" create="0" edit="0">-->
<!-- <header>-->
<!-- <field name="state" widget="statusbar" statusbar_visible="draft,confirmed,partially_available,assigned,done"/>-->
<!-- </header>-->
<!-- <sheet>-->
<!-- <field name="company_id" invisible="1"/>-->
<!-- <field name="picking_id" invisible="1"/>-->
<!-- <field name="location_id" invisible="1"/>-->
<!-- <field name="location_dest_id" invisible="1"/>-->
<!-- <field name="package_id" invisible="1"/>-->
<!-- <field name="product_uom_category_id" invisible="1"/>-->
<!-- <group>-->
<!-- <group>-->
<!-- <field name="date"/>-->
<!-- <field name="reference"/>-->
<!-- <field name="origin"/>-->
<!-- <field name="product_id"/>-->
<!-- <field name="location_id" options="{'no_create': True}" groups="stock.group_stock_multi_locations"/>-->
<!-- <field name="location_dest_id" options="{'no_create': True}" groups="stock.group_stock_multi_locations"/>-->
<!-- </group>-->
<!-- <group>-->
<!-- <div class="o_row" invisible="state == 'done'">-->
<!-- <field name="product_uom_id" options="{'no_create': True}" groups="uom.group_uom"/>-->
<!-- </div>-->
<!-- <div class="o_row">-->
<!-- <field name="product_uom_id" options="{'no_create': True}" groups="uom.group_uom"/>-->
<!-- </div>-->
<!-- <field name="lot_id" groups="stock.group_production_lot" context="{'default_product_id': product_id, 'active_picking_id': picking_id, 'default_company_id': company_id}" invisible="lot_id == False and lot_name != False"/>-->
<!-- <field name="lot_name" groups="stock.group_production_lot" invisible="lot_id != False or lot_name == False"/>-->
<!-- <field name="package_id" groups="stock.group_tracking_lot"/>-->
<!-- <field name="result_package_id" groups="stock.group_tracking_lot"/>-->
<!-- <field name="owner_id" groups="stock.group_tracking_owner"/>-->
<!-- <field name="create_uid" widget="many2one_avatar_user" optional="hide"/>-->
<!-- </group>-->
<!-- </group>-->
<!-- </sheet>-->
<!-- </form>-->
<!-- </xpath>-->
<!-- </data>-->
<!-- </field>-->
<!-- </record>-->

<record id="stock_picking_batch_form_inherit_commodity_trading" model="ir.ui.view">
<field name="name">stock.picking.batch.form.customization.commodity.trading</field>
<field name="mode">extension</field>
Expand All @@ -384,8 +328,7 @@
<field name="type">form</field>
<field name="arch" type="xml">
<data>
<!-- TODO: reduce xpath -->
<xpath expr="//form[1]/sheet[1]/group[1]" position="after">
<xpath expr="//notebook" position="before">
<group>
<group>
<field name="x_truck_no"/>
Expand All @@ -400,7 +343,6 @@
</group>
</group>
</xpath>
<!-- TODO: needed? -->
<xpath expr="//field[@name='move_line_ids']" position="inside">
<tree editable="top" decoration-muted="state == 'cancel'" string="Move Lines" default_order="location_id">
<field name="tracking" column_invisible="True"/>
Expand All @@ -420,7 +362,6 @@
</data>
</field>
</record>

<record id="view_production_lot_tree_inherit_commodity_trading" model="ir.ui.view">
<field name="name">stock.production.lot.tree.customization.commodity.trading</field>
<field name="mode">extension</field>
Expand All @@ -430,7 +371,6 @@
<field name="type">tree</field>
<field name="arch" type="xml">
<data>
<!-- <xpath expr="//tree[1]/field[@name='name']" position="after">-->
<xpath expr="//field[@name='name']" position="after">
<field name="x_number_of_bags" optional="show"/>
</xpath>
Expand All @@ -447,8 +387,7 @@
<field name="type">form</field>
<field name="arch" type="xml">
<data>
<!-- TODO: reduce xpath -->
<xpath expr="//form[1]/sheet[1]/group[@name='main_group']/group[2]" position="inside">
<xpath expr="//group[@name='main_group']/group[2]" position="inside">
<field name="x_number_of_bags"/>
</xpath>
</data>
Expand Down Expand Up @@ -484,7 +423,7 @@
<field name="type">form</field>
<field name="arch" type="xml">
<data>
<xpath expr="//form[1]/sheet[1]/group[1]" position="replace">
<xpath expr="//group[1]" position="replace">
<group>
<group>
<field name="x_moisture" help="8% to 8.5% Maximum."/>
Expand Down
43 changes: 9 additions & 34 deletions commodity_trading/data/knowledge_article.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<span class="text-black"
style="font-size: 11pt; background-color: transparent; font-weight: 400; font-style: normal; text-decoration: none;">This
configuration is quite useful for traders who deal with commodities like
Soybeans, Rice, Sugar, Wheat, Corn, Cotton Etc. CRM, Sales, purchase,
Soybeans, Rice, Sugar, Wheat, Corn, Cotton Etc. CRM, Sales, Purchase,
Inventory, Manufacturing, Quality, Accounting Application will be useful to
setup Configuration.</span>
</font>
Expand All @@ -73,7 +73,7 @@
<p>
<font class="text-black">For most of purchases they keep Broker in the loop who is
in direct contact with actual vendor. Broker is responsible for quality of
products &amp; He Gets commision from trader for assistance on managing
products &amp; He Gets commission from trader for assistance on managing
processes.</font>
<br/>
</p>
Expand All @@ -83,7 +83,7 @@
<br/>
</p>
<h1>
<font class="text-black">business Flows</font>
<font class="text-black">Business Flows</font>
<br/>
</h1>
<h2>
Expand All @@ -102,19 +102,19 @@
</font>
</h2>
<p>
<font class="text-black">Purchase commoditiesfrom Vendors locally or import
<font class="text-black">Purchase commodities from Vendors locally or import
&amp; store at their different warehouses &amp; after getting orders from their
customer they will deliver to them.</font>
<br/>
</p>
<p>
<font class="text-black">1. Create Purchase Order , Select Broker who is work as
<font class="text-black">1. Create Purchase Order, Select Broker who is work as
mediator between Vendor &amp; buyer &amp; responsible for if anything unwanted
happens during delivery or in Quality of commodities. confirm Purchase order,</font>
</p>
<p>
<font class="text-black">2. In Inventory application in receipt menu select the
transfer which needs to receive &amp; select the action 'select for GRN' .</font>
transfer which needs to receive &amp; select the action 'select for GRN'.</font>
</p>
<p>
<font class="text-black">3. In inventory Application inWeighing Scale/GRN
Expand All @@ -134,68 +134,43 @@
<p style="margin-bottom: 0px;">
<font class="text-black">for some commodities, they purchase only after
getting orders from their customer, vendor could dropship or
commoditiesship to warehouse first &amp; they deliverto customer at
commodities ship to warehouse first &amp; they deliver to customer at
later stage.</font>
</p>
<p style="margin-bottom: 0px;">
<font class="text-black"></font>
</p>
<p style="margin-bottom: 0px;">
<font class="text-black">1. Create Sales order according to customer's requirements,
automatically Request for quotation will be created according to vendor define
over product form (or Vendor price list)</font>
</p>
<p style="margin-bottom: 0px;">
<font class="text-black"></font>
</p>
<p style="margin-bottom: 0px;">
<font class="text-black">2. Based on approval of RFQ , purchase order generated
&amp; dropship will be created to deliver material directly to customer.</font>
</p>
<p style="margin-bottom: 0px;">
<font class="text-black"></font>
</p>
<h2 style="margin-bottom: 0px;">Use Case: 3 Sell after processing Material
internally</h2>
<h2 style="margin-bottom: 0px;">Purchase different Commodities &gt;&gt; receipt &gt;&gt;
Blending Process ( Manufacturing Order ) &gt;&gt; material availability of FG
&gt;&gt; Sales order &gt;&gt; Delivery</h2>
<p style="margin-bottom: 0px;">
<br/>
</p>
<br/>
<p style="margin-bottom: 0px;">
<font class="text-black">They purchase the same commodities of different qualities
&amp; then do the blending(Mixing) process to make another quality of same
commodities &amp; sell them.</font>
<br/>
</p>
<p style="margin-bottom: 0px;">
<font class="text-black"></font>
</p>
<p style="margin-bottom: 0px;">
<font class="text-black">1. Purchase Raw materials of commodities &amp; store in
Warehouse.</font>
</p>
<p style="margin-bottom: 0px;">
<font class="text-black"></font>
</p>
<p style="margin-bottom: 0px;">
<font class="text-black">2. Create Manufacturing Order of Finish commodities with
Blending (mixing) Process &amp; complete MO to product FG in stock.</font>
</p>
<p style="margin-bottom: 0px;">
<font class="text-black"></font>
</p>
<p style="margin-bottom: 0px;">
<font class="text-black">3. Create Sales order to sell &amp; deliver the FG
commodities.</font>
</p>
<p>
<font class="text-black"></font>
</p>
<p style="margin-bottom: 0px;">
<font class="text-black"></font>
</p> ]]>
]]>
</field>
</record>
</odoo>
18 changes: 9 additions & 9 deletions commodity_trading/data/product_template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<field name="name">Green Soybeans</field>
<field name="categ_id" ref="product_category_4"/>
<field name="uom_id" ref="uom.product_uom_ton"/>
<field name="uom_po_id" ref="uom.product_uom_ton"/>
<!-- <field name="uom_po_id" ref="uom.product_uom_ton"/>-->
<field name="detailed_type">product</field>
<field name="image_1920" type="base64" file="commodity_trading/static/src/binary/product_template/1-image_1920"/>
<field name="tracking">lot</field>
Expand All @@ -12,7 +12,7 @@
<field name="name">Yellow Soybeans</field>
<field name="categ_id" ref="product_category_4"/>
<field name="uom_id" ref="uom.product_uom_ton"/>
<field name="uom_po_id" ref="uom.product_uom_ton"/>
<!-- <field name="uom_po_id" ref="uom.product_uom_ton"/>-->
<field name="detailed_type">product</field>
<field name="image_1920" type="base64" file="commodity_trading/static/src/binary/product_template/2-image_1920"/>
<field name="tracking">lot</field>
Expand All @@ -21,15 +21,15 @@
<field name="name">Black Soybeans</field>
<field name="categ_id" ref="product_category_4"/>
<field name="uom_id" ref="uom.product_uom_kgm"/>
<field name="uom_po_id" ref="uom.product_uom_kgm"/>
<!-- <field name="uom_po_id" ref="uom.product_uom_kgm"/>-->
<field name="detailed_type">product</field>
<field name="image_1920" type="base64" file="commodity_trading/static/src/binary/product_template/3-image_1920"/>
</record>
<record id="product_template_4" model="product.template" context="{'create_product_product': False}">
<field name="name">Kurakake Soybeans</field>
<field name="categ_id" ref="product.product_category_all"/>
<field name="uom_id" ref="uom.product_uom_ton"/>
<field name="uom_po_id" ref="uom.product_uom_ton"/>
<!-- <field name="uom_po_id" ref="uom.product_uom_ton"/>-->
<field name="detailed_type">product</field>
<field name="image_1920" type="base64" file="commodity_trading/static/src/binary/product_template/4-image_1920"/>
<field name="route_ids" eval="[(6, 0, [ref('purchase_stock.route_warehouse0_buy'), ref('stock_dropshipping.route_drop_shipping')])]"/>
Expand All @@ -38,7 +38,7 @@
<field name="name">Brown Soybeans</field>
<field name="categ_id" ref="product.product_category_all"/>
<field name="uom_id" ref="uom.product_uom_ton"/>
<field name="uom_po_id" ref="uom.product_uom_ton"/>
<!-- <field name="uom_po_id" ref="uom.product_uom_ton"/>-->
<field name="detailed_type">product</field>
<field name="tracking">lot</field>
<field name="route_ids" eval="[(6, 0, [ref('purchase_stock.route_warehouse0_buy'), ref('stock_dropshipping.route_drop_shipping')])]"/>
Expand All @@ -47,23 +47,23 @@
<field name="name">Rice - IR16 - parboild</field>
<field name="categ_id" ref="product_category_5"/>
<field name="uom_id" ref="uom.product_uom_ton"/>
<field name="uom_po_id" ref="uom.product_uom_ton"/>
<!-- <field name="uom_po_id" ref="uom.product_uom_ton"/>-->
<field name="detailed_type">product</field>
<field name="image_1920" type="base64" file="commodity_trading/static/src/binary/product_template/6-image_1920"/>
</record>
<record id="product_template_7" model="product.template" context="{'create_product_product': False}">
<field name="name">Rice - IR24 - parboild</field>
<field name="categ_id" ref="product_category_5"/>
<field name="uom_id" ref="uom.product_uom_ton"/>
<field name="uom_po_id" ref="uom.product_uom_ton"/>
<!-- <field name="uom_po_id" ref="uom.product_uom_ton"/>-->
<field name="detailed_type">product</field>
<field name="image_1920" type="base64" file="commodity_trading/static/src/binary/product_template/7-image_1920"/>
</record>
<record id="product_template_8" model="product.template" context="{'create_product_product': False}">
<field name="name">Rice </field>
<field name="categ_id" ref="product_category_5"/>
<field name="uom_id" ref="uom.product_uom_ton"/>
<field name="uom_po_id" ref="uom.product_uom_ton"/>
<!-- <field name="uom_po_id" ref="uom.product_uom_ton"/>-->
<field name="detailed_type">product</field>
<field name="image_1920" type="base64" file="commodity_trading/static/src/binary/product_template/8-image_1920"/>
<field name="route_ids" eval="[(6, 0, [ref('mrp.route_warehouse0_manufacture')])]"/>
Expand All @@ -72,7 +72,7 @@
<field name="name">test Material</field>
<field name="categ_id" ref="product.product_category_all"/>
<field name="uom_id" ref="uom.product_uom_unit"/>
<field name="uom_po_id" ref="uom.product_uom_unit"/>
<!-- <field name="uom_po_id" ref="uom.product_uom_unit"/>-->
<field name="detailed_type">product</field>
<field name="tracking">lot</field>
</record>
Expand Down

0 comments on commit 9ae5b11

Please sign in to comment.