Skip to content

Commit

Permalink
[ADD] agriculture: improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
dhrs-odoo committed Feb 12, 2024
1 parent ab1ab0e commit 7cf799b
Show file tree
Hide file tree
Showing 21 changed files with 268 additions and 353 deletions.
4 changes: 1 addition & 3 deletions agriculture/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
""",
'depends': [
'website_sale_loyalty',
'purchase',
'knowledge',
'payment_demo',
'pos_sale',
Expand All @@ -31,7 +30,6 @@
'data/pos_category.xml',
'data/pos_config.xml',
'data/product_category.xml',
'data/product_template.xml',
'data/product_pricelist.xml',
'data/product_product.xml',
'data/loyalty_program.xml',
Expand All @@ -54,7 +52,7 @@
'demo/sale_order.xml',
'demo/sale_order_line.xml',
'demo/loyalty_card.xml',
# 'demo/sale_order_post.xml',
'demo/sale_order_post.xml',
'demo/website.xml',
'demo/website_views.xml',
'demo/website_page.xml',
Expand Down
2 changes: 1 addition & 1 deletion agriculture/data/ir_attachment_pre.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo>
<odoo noupdate="1">
<record id="ir_attachment_583" model="ir.attachment">
<field name="name">Agro Covercc.png</field>
<field name="datas" type="base64" file="agriculture/static/src/binary/ir_attachment/583-AgroCovercc.png"/>
Expand Down
7 changes: 1 addition & 6 deletions agriculture/data/ir_model_fields.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo>
<record id="new_image_product_binary" model="ir.model.fields">
<field name="name">x_binary_field_product_template</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="new_many2one_lead_survey" model="ir.model.fields">
<field name="name">x_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="new_many2one_lead_answer" model="ir.model.fields">
Expand All @@ -23,7 +21,6 @@
<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="new_related_field_product_story" model="ir.model.fields">
Expand All @@ -32,9 +29,7 @@
<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_binary_field_product_template</field>
<field name="store" eval="False"/>
</record>
</odoo>
38 changes: 0 additions & 38 deletions agriculture/data/ir_ui_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,42 +43,4 @@
</xpath>
</field>
</record>
<!-- <record id="stock_pi_2610a694-e60c-4d7b-be2d-721bc7be6b1e" model="ir.ui.view">
<field name="name">stock.picking.form.customization</field>
<field name="inherit_id" ref="stock.view_picking_form"/>
<field name="mode">extension</field>
<field name="model">stock.picking</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>
2 changes: 1 addition & 1 deletion agriculture/data/knowledge_article.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<odoo>
<record id="knowledge_article_1" model="knowledge.article">
<field name="name">Agriculture Retails</field>
<field name="inherited_permission">write</field>
<field name="internal_permission">write</field>
<field name="icon">🍀</field>
<field name="cover_image_id" ref="knowledge_cover_6"/>
<field name="is_article_visible_by_everyone" eval="True"/>
Expand Down
2 changes: 1 addition & 1 deletion agriculture/data/knowledge_cover.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo>
<odoo noupdate="1">
<record id="knowledge_cover_6" model="knowledge.cover">
<field name="attachment_id" ref="ir_attachment_583"/>
</record>
Expand Down
4 changes: 2 additions & 2 deletions agriculture/data/pos_category.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
<odoo>
<odoo noupdate="1">
<record id="pos_category_1" model="pos.category">
<field name="name">Seeds</field>
</record>
Expand All @@ -12,4 +12,4 @@
<record id="pos_category_4" model="pos.category">
<field name="name">Plant Nutrition</field>
</record>
</odoo>
</odoo>
4 changes: 2 additions & 2 deletions agriculture/data/pos_config.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<?xml version='1.0' encoding='UTF-8'?>
<odoo noupdate="1">
<record id="point_of_sale.pos_config_main" model="pos.config">
<field name="start_category" eval="1"/>
<field name="iface_available_categ_ids" eval="[Command.link(ref('pos_category_1')), Command.link(ref('pos_category_2')), Command.link(ref('pos_category_3')), Command.link(ref('pos_category_4'))]"/>
Expand Down

0 comments on commit 7cf799b

Please sign in to comment.