Skip to content

Commit

Permalink
[IMP] website_sale_order_to_cart: Remove Accept and Pay button
Browse files Browse the repository at this point in the history
  • Loading branch information
unaiberis committed Oct 2, 2024
1 parent ca3fad2 commit 8d93435
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1 +1,12 @@
{'name': 'Sale Order Line Commitment Date and Delivery Address', 'version': '16.0.1.0.0', 'author': 'Avanzosc', 'summary': 'Add commitment date and delivery address fields to sale order lines.', 'website': 'https://github.com/avanzosc/sale-order-addons', 'license': 'LGPL-3', 'depends': ['sale_management'], 'data': ['views/sale_order_line_view.xml'], 'installable': True, 'application': False}
{
"name": "Sale Order Line Commitment Date and Delivery Address",
"version": "16.0.1.0.0",
"author": "Avanzosc",
"summary": "Add commitment date and delivery address fields to sale order lines.",
"website": "https://github.com/avanzosc/sale-addons",
"license": "LGPL-3",
"depends": ["sale_management"],
"data": ["views/sale_order_line_view.xml"],
"installable": True,
"application": False,
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from odoo import models, fields
from odoo import fields, models


class SaleOrderLine(models.Model):
_inherit = "sale.order.line"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="view_order_line_tree_inherit" model="ir.ui.view">
<field name="name">sale.order.line.tree.inherit</field>
<field name="model">sale.order.line</field>
<field name="inherit_id" ref="sale.view_order_line_tree"/>
<field name="inherit_id" ref="sale.view_order_line_tree" />
<field name="arch" type="xml">
<xpath expr="//tree" position="inside">
<field name="commitment_date" />
Expand All @@ -15,11 +15,21 @@
<record id="view_order_line_search_inherit" model="ir.ui.view">
<field name="name">sale.order.line.search.inherit</field>
<field name="model">sale.order.line</field>
<field name="inherit_id" ref="sale.view_sales_order_line_filter"/>
<field name="inherit_id" ref="sale.view_sales_order_line_filter" />
<field name="arch" type="xml">
<xpath expr="//group" position="inside">
<filter string="Commitment Date" name="group_by_commitment_date" domain="[]" context="{'group_by': 'commitment_date'}"/>
<filter string="Delivery Address" name="group_by_delivery_address" domain="[]" context="{'group_by': 'delivery_address'}"/>
<filter
string="Commitment Date"
name="group_by_commitment_date"
domain="[]"
context="{'group_by': 'commitment_date'}"
/>
<filter
string="Delivery Address"
name="group_by_delivery_address"
domain="[]"
context="{'group_by': 'delivery_address'}"
/>
</xpath>
</field>
</record>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)
12 changes: 12 additions & 0 deletions website_sale_order_to_cart/views/website_templates.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,17 @@
</div>
</t>
</xpath>

<xpath expr="//a[@id='o_sale_portal_paynow']" position="attributes">
<attribute name="t-if">False</attribute>
</xpath>

<xpath
expr="//div[@id='sale_order_communication']/preceding-sibling::div[1]"
position="attributes"
>
<attribute name="t-if">False</attribute>
</xpath>

</template>
</odoo>

0 comments on commit 8d93435

Please sign in to comment.