diff options
| author | Mahendra barad <mba@openerp.com> | 2017-09-04 18:37:25 +0530 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2017-12-12 10:56:13 +0100 |
| commit | 945b71cb2ba059acf23c963d03cfc84c9c0c714f (patch) | |
| tree | 29f47ff1db8a6e46a83b4f9dbfe90a6965162478 | |
| parent | 598f4f7315f0ac5fd67a002ca31bc98bdd606779 (diff) | |
[MOV] (website_)sale_stock: move customer portal directly into sale_stock
Customer portal is not dependent from website anymore. In this commit we
move customer portal code related to sale stock directly in sale stock
instead of website sale stock.
| -rw-r--r-- | addons/sale_stock/__init__.py | 1 | ||||
| -rw-r--r-- | addons/sale_stock/__manifest__.py | 1 | ||||
| -rw-r--r-- | addons/sale_stock/controllers/__init__.py | 4 | ||||
| -rw-r--r-- | addons/sale_stock/controllers/portal.py (renamed from addons/website_sale_stock/controllers/portal.py) | 0 | ||||
| -rw-r--r-- | addons/sale_stock/views/sale_stock_portal_template.xml | 35 | ||||
| -rw-r--r-- | addons/website_sale_delivery/views/website_sale_delivery_templates.xml | 2 | ||||
| -rw-r--r-- | addons/website_sale_stock/controllers/__init__.py | 1 | ||||
| -rw-r--r-- | addons/website_sale_stock/views/website_sale_stock_templates.xml | 32 |
8 files changed, 42 insertions, 34 deletions
diff --git a/addons/sale_stock/__init__.py b/addons/sale_stock/__init__.py index 2609681a938..5905766d867 100644 --- a/addons/sale_stock/__init__.py +++ b/addons/sale_stock/__init__.py @@ -1,5 +1,6 @@ # -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. +from . import controllers from . import models from . import report diff --git a/addons/sale_stock/__manifest__.py b/addons/sale_stock/__manifest__.py index b21d32013d5..bc8f0d777d1 100644 --- a/addons/sale_stock/__manifest__.py +++ b/addons/sale_stock/__manifest__.py @@ -33,6 +33,7 @@ You can choose flexible invoicing methods: 'views/stock_views.xml', 'views/res_config_settings_views.xml', 'views/account_invoice_views.xml', + 'views/sale_stock_portal_template.xml', 'report/sale_order_report_templates.xml', 'report/stock_report_deliveryslip.xml', 'data/sale_stock_data.xml', diff --git a/addons/sale_stock/controllers/__init__.py b/addons/sale_stock/controllers/__init__.py new file mode 100644 index 00000000000..903b755e71e --- /dev/null +++ b/addons/sale_stock/controllers/__init__.py @@ -0,0 +1,4 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +from . import portal diff --git a/addons/website_sale_stock/controllers/portal.py b/addons/sale_stock/controllers/portal.py index 999b12a1d6b..999b12a1d6b 100644 --- a/addons/website_sale_stock/controllers/portal.py +++ b/addons/sale_stock/controllers/portal.py diff --git a/addons/sale_stock/views/sale_stock_portal_template.xml b/addons/sale_stock/views/sale_stock_portal_template.xml new file mode 100644 index 00000000000..ece6a8e0783 --- /dev/null +++ b/addons/sale_stock/views/sale_stock_portal_template.xml @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="utf-8"?> +<odoo> + <template id="portal_order_page_shipping" name="Orders Shipping Followup" inherit_id="sale.portal_order_page"> + <xpath expr="//div[@id='shipping_address']" position="inside"> + <t t-if="order.picking_ids"> + <div> + <strong>Delivery Orders</strong> + </div> + <div> + <t t-foreach="order.picking_ids.filtered(lambda picking: picking.picking_type_id.code != 'internal')" t-as="i"> + <t t-set="report_url" t-value="'/my/picking/pdf/%s?%s' % (i.id, keep_query())"/> + <div id='picking_info'> + <a t-att-href="report_url"><span class="fa fa-download"/></a> + <a t-att-href="report_url"><span t-field="i.name"/></a> + <span class="text-muted" t-field="i.date" t-options='{"widget": "date"}'/> + <t t-if="i.state == 'done'"> + <span class="label label-success label-text-align"><i class="fa fa-fw fa-truck"/> Shipped</span> + </t> + <t t-if="i.state == 'partially_available'"> + <span class="label label-warning label-text-align"><i class="fa fa-fw fa-clock-o"/> Partially Available</span> + </t> + <t t-if="i.state == 'cancel'"> + <span class="label label-danger label-text-align"><i class="fa fa-fw fa-times"/> Cancelled</span> + </t> + <t t-if="i.state in ['draft', 'waiting', 'confirmed', 'assigned']"> + <span class="label label-info label-text-align"><i class="fa fa-fw fa-clock-o"/> Preparation</span> + </t> + </div> + </t> + </div> + </t> + </xpath> + </template> + +</odoo> diff --git a/addons/website_sale_delivery/views/website_sale_delivery_templates.xml b/addons/website_sale_delivery/views/website_sale_delivery_templates.xml index 52393537560..63f877a0a52 100644 --- a/addons/website_sale_delivery/views/website_sale_delivery_templates.xml +++ b/addons/website_sale_delivery/views/website_sale_delivery_templates.xml @@ -59,7 +59,7 @@ </xpath> </template> - <template id="portal_order_page_shipping_tracking" name="Shipping tracking on orders followup" inherit_id="website_sale_stock.portal_order_page_shipping"> + <template id="portal_order_page_shipping_tracking" name="Shipping tracking on orders followup" inherit_id="sale_stock.portal_order_page_shipping"> <xpath expr="//div[@id='picking_info']" position="after"> <div t-if="i.carrier_tracking_ref"> Tracking: <span t-field="i.carrier_id.name"/> diff --git a/addons/website_sale_stock/controllers/__init__.py b/addons/website_sale_stock/controllers/__init__.py index 086f8c9a904..5d4b25db9c0 100644 --- a/addons/website_sale_stock/controllers/__init__.py +++ b/addons/website_sale_stock/controllers/__init__.py @@ -2,4 +2,3 @@ # Part of Odoo. See LICENSE file for full copyright and licensing details. from . import main -from . import portal
\ No newline at end of file diff --git a/addons/website_sale_stock/views/website_sale_stock_templates.xml b/addons/website_sale_stock/views/website_sale_stock_templates.xml index 90579a713fb..87798d2fe63 100644 --- a/addons/website_sale_stock/views/website_sale_stock_templates.xml +++ b/addons/website_sale_stock/views/website_sale_stock_templates.xml @@ -1,37 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> <odoo> - <template id="portal_order_page_shipping" name="Orders Shipping Followup" inherit_id="sale.portal_order_page"> - <xpath expr="//div[@id='shipping_address']" position="inside"> - <t t-if="order.picking_ids"> - <div> - <strong>Delivery Orders</strong> - </div> - <div> - <t t-foreach="order.picking_ids.filtered(lambda picking: picking.picking_type_id.code != 'internal')" t-as="i"> - <t t-set="report_url" t-value="'/my/picking/pdf/%s?%s' % (i.id, keep_query())"/> - <div id='picking_info'> - <a t-att-href="report_url"><span class="fa fa-download"/></a> - <a t-att-href="report_url"><span t-field="i.name"/></a> - <span class="text-muted" t-field="i.date" t-options='{"widget": "date"}'/> - <t t-if="i.state == 'done'"> - <span class="label label-success label-text-align"><i class="fa fa-fw fa-truck"/> Shipped</span> - </t> - <t t-if="i.state == 'partially_available'"> - <span class="label label-warning label-text-align"><i class="fa fa-fw fa-clock-o"/> Partially Available</span> - </t> - <t t-if="i.state == 'cancel'"> - <span class="label label-danger label-text-align"><i class="fa fa-fw fa-times"/> Cancelled</span> - </t> - <t t-if="i.state in ['draft', 'waiting', 'confirmed', 'assigned']"> - <span class="label label-info label-text-align"><i class="fa fa-fw fa-clock-o"/> Preparation</span> - </t> - </div> - </t> - </div> - </t> - </xpath> - </template> - <template id="assets_frontend" inherit_id="website.assets_frontend" name="Website Sale Stock"> <xpath expr="." position="inside"> <script type="text/javascript" src="/website_sale_stock/static/src/js/website_sale_stock.js" /> |
