Initial commit: Sale packages

This commit is contained in:
Ernad Husremovic 2025-08-29 15:20:49 +02:00
commit 14e3d26998
6469 changed files with 2479670 additions and 0 deletions

View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<record id="view_delivery_carrier_form_with_onsite_picking" model="ir.ui.view">
<field name="inherit_id" ref="delivery.view_delivery_carrier_form"/>
<field name="name">Delivery Carrier with Onsite Picking</field>
<field name="model">delivery.carrier</field>
<field name="arch" type="xml">
<xpath expr="//field[@name='integration_level']" position="before">
<field attrs="{'invisible': [('delivery_type', '!=', 'onsite')]}" name="warehouse_id" options="{'no_quick_create': True}"
domain="[('company_id', '=?', company_id)]"/>
</xpath>
</field>
</record>
</odoo>

View file

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="res_config_settings_view_form" model="ir.ui.view">
<field name="name">res.config.settings.view.form.inherit.website.sale.onsite</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="website_sale.res_config_settings_view_form" />
<field name="arch" type="xml">
<xpath expr="//div[@id='onsite_payment_setting']/div[hasclass('o_setting_right_pane')]" position="inside">
<div class="content-group">
<label class="col-lg-3" string="Picking sites" for="picking_site_ids"/>
<field name="picking_site_ids" domain="[('delivery_type', '=', 'onsite')]" widget="many2many_tags"
context="{'default_website_id': website_id, 'default_product_id': %(website_sale_picking.onsite_delivery_product)d, 'default_delivery_type': 'onsite', 'default_website_published': True, 'default_company_id': company_id}"/>
</div>
<div class="mt8">
<button name="%(delivery.action_delivery_carrier_form)d" icon="fa-arrow-right" type="action" string="Customize Pickup Sites" class="btn-link" context="{'search_default_delivery_type': 'onsite'}"/>
</div>
</xpath>
</field>
</record>
</odoo>

View file

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8" ?>
<odoo>
<template id="checkout_delivery" inherit_id="website_sale_delivery.payment_delivery_methods">
<xpath expr="//input[@name='delivery_type']" position="attributes">
<attribute name="t-att-data-delivery-type">delivery.delivery_type</attribute>
</xpath>
</template>
<template id="checkout_payment" inherit_id="payment.checkout">
<xpath expr="//input[@name='o_payment_radio']" position="attributes">
<attribute name="t-att-data-is-onsite">1 if provider.custom_mode == 'onsite' else 0</attribute>
</xpath>
</template>
<template id="payment_confirmation_status" inherit_id="website_sale.payment_confirmation_status">
<xpath expr="(//div[hasclass('card-body')])[1]" position="replace">
<t t-if="payment_tx_id.provider_id.custom_mode == 'onsite'">
<div class="card-body">
<div class="o_header_carrier_message">
<b t-out="order.carrier_id.name"/><span class="text-muted"> (On site picking)</span>
</div>
<div class="o_body_carrier_message">
<t t-out="order.carrier_id.website_description"/>
</div>
</div>
</t>
<t t-else="">
<t>$0</t> <!-- Replace by old content -->
</t>
</xpath>
</template>
</odoo>