Skip to content

Commit

Permalink
agriculture: PR review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
dhrs-odoo committed Feb 21, 2024
1 parent 55ec6ee commit c499a7c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 16 deletions.
2 changes: 1 addition & 1 deletion agriculture/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
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.
They utilize a suite of modules including Point of Sale, Inventory, Sales, Purchase, Survey, Accounting, Contact and Dashboard.
Expanding into the online realm, a website and E-commerce applications can significantly aid their growth in the agricultural retail sector.
""",
'depends': [
Expand Down
5 changes: 0 additions & 5 deletions agriculture/data/ir_actions_server.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@
<field name="model_id" ref = "crm.model_crm_lead"/>
<field name="state">code</field>
<field name="code"><![CDATA[
if records.x_answer:
raise UserError("Survey alrady done, You can create new Lead/Opportunity and take new survey.")
if not records.x_survey:
raise UserError("Survey not selected.")
user_input = records.x_survey._create_answer(user=env.user)
records.write({'x_answer': user_input.id})
action = {
Expand Down
4 changes: 2 additions & 2 deletions agriculture/data/ir_ui_view.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<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_answer != False"/>
<button name="%(action_lead_survey_start)d" string="Survey Start" class="btn btn-primary" type="action" invisible="(x_answer != False) or (x_survey == False)"/>
</xpath>
<xpath expr="//field[@name='tag_ids']" position="after">
<field name="x_survey"/>
Expand All @@ -39,7 +39,7 @@
<field name="type">form</field>
<field name="arch" type="xml">
<xpath expr="//field[@name='uom_po_id']" position="after">
<field name="x_binary_field_product_template" widget="image"/>
<field name="x_binary_field_product_template" />
</xpath>
</field>
</record>
Expand Down
2 changes: 1 addition & 1 deletion agriculture/data/knowledge_article.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
</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.
They utilize a suite of modules including Point of Sale, Inventory, Sales, Purchase, Survey, Accounting, Contact and Dashboard. 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">
Expand Down
11 changes: 4 additions & 7 deletions agriculture/demo/sale_order_post.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,13 @@
<function name="action_confirm" model="sale.order" eval="[[ref('sale_order_1'), ref('sale_order_2')]]"/>

<function name="button_validate" model="stock.picking" context="{'skip_sms': True}">
<value model="stock.picking" eval="obj().env.ref('agriculture.sale_order_1').procurement_group_id.stock_move_ids.picking_id.ids"/>
<value model="stock.picking" eval="obj().env.ref('agriculture.sale_order_1').picking_ids.ids"/>
</function>

<!-- Create Invoice -->
<record id="sale_advance_payment_inv_2" model="sale.advance.payment.inv">
<field name="advance_payment_method">delivered</field>
<field name="sale_order_ids" eval="[Command.set([ref('sale_order_2')])]"/>
</record>

<function model="sale.advance.payment.inv" name="create_invoices" eval="[ref('sale_advance_payment_inv_2')]"/>
<function name="_create_invoices" model="sale.order">
<value eval="[ref('sale_order_2')]"/>
</function>

<!-- Confirm invoice -->
<function model="account.move" name="action_post">
Expand Down

0 comments on commit c499a7c

Please sign in to comment.