From e326cb29c1d1d1f1b58542782de8ca554247c866 Mon Sep 17 00:00:00 2001 From: Tran Anh Tuan Date: Thu, 14 Mar 2024 15:15:37 +0700 Subject: [PATCH] [ADD] shipment_advice_cash_on_delivery: Add action on shipment advice to print cash on delivery invoices --- .../addons/shipment_advice_cash_on_delivery | 1 + .../shipment_advice_cash_on_delivery/setup.py | 6 + shipment_advice/models/shipment_advice.py | 3 +- shipment_advice_cash_on_delivery/README.rst | 88 ++++ shipment_advice_cash_on_delivery/__init__.py | 1 + .../__manifest__.py | 24 + .../models/__init__.py | 3 + .../models/account_payment_mode.py | 10 + .../models/shipment_advice.py | 20 + .../models/stock_picking.py | 45 ++ .../readme/CONFIGURE.rst | 1 + .../readme/CONTRIBUTORS.rst | 3 + .../readme/DESCRIPTION.rst | 4 + .../static/description/index.html | 435 ++++++++++++++++++ .../tests/__init__.py | 1 + .../test_shipment_advice_cash_on_delivery.py | 231 ++++++++++ .../views/account_payment_mode_views.xml | 17 + .../views/shipment_advice.xml | 30 ++ .../views/stock_picking_views.xml | 20 + 19 files changed, 941 insertions(+), 2 deletions(-) create mode 120000 setup/shipment_advice_cash_on_delivery/odoo/addons/shipment_advice_cash_on_delivery create mode 100644 setup/shipment_advice_cash_on_delivery/setup.py create mode 100644 shipment_advice_cash_on_delivery/README.rst create mode 100644 shipment_advice_cash_on_delivery/__init__.py create mode 100644 shipment_advice_cash_on_delivery/__manifest__.py create mode 100644 shipment_advice_cash_on_delivery/models/__init__.py create mode 100644 shipment_advice_cash_on_delivery/models/account_payment_mode.py create mode 100644 shipment_advice_cash_on_delivery/models/shipment_advice.py create mode 100644 shipment_advice_cash_on_delivery/models/stock_picking.py create mode 100644 shipment_advice_cash_on_delivery/readme/CONFIGURE.rst create mode 100644 shipment_advice_cash_on_delivery/readme/CONTRIBUTORS.rst create mode 100644 shipment_advice_cash_on_delivery/readme/DESCRIPTION.rst create mode 100644 shipment_advice_cash_on_delivery/static/description/index.html create mode 100644 shipment_advice_cash_on_delivery/tests/__init__.py create mode 100644 shipment_advice_cash_on_delivery/tests/test_shipment_advice_cash_on_delivery.py create mode 100644 shipment_advice_cash_on_delivery/views/account_payment_mode_views.xml create mode 100644 shipment_advice_cash_on_delivery/views/shipment_advice.xml create mode 100644 shipment_advice_cash_on_delivery/views/stock_picking_views.xml diff --git a/setup/shipment_advice_cash_on_delivery/odoo/addons/shipment_advice_cash_on_delivery b/setup/shipment_advice_cash_on_delivery/odoo/addons/shipment_advice_cash_on_delivery new file mode 120000 index 00000000..74408cf6 --- /dev/null +++ b/setup/shipment_advice_cash_on_delivery/odoo/addons/shipment_advice_cash_on_delivery @@ -0,0 +1 @@ +../../../../shipment_advice_cash_on_delivery \ No newline at end of file diff --git a/setup/shipment_advice_cash_on_delivery/setup.py b/setup/shipment_advice_cash_on_delivery/setup.py new file mode 100644 index 00000000..28c57bb6 --- /dev/null +++ b/setup/shipment_advice_cash_on_delivery/setup.py @@ -0,0 +1,6 @@ +import setuptools + +setuptools.setup( + setup_requires=['setuptools-odoo'], + odoo_addon=True, +) diff --git a/shipment_advice/models/shipment_advice.py b/shipment_advice/models/shipment_advice.py index 64cf914b..cc334e3c 100644 --- a/shipment_advice/models/shipment_advice.py +++ b/shipment_advice/models/shipment_advice.py @@ -526,9 +526,8 @@ def button_open_receptions_in_progress(self): return action def print_all_deliveryslip(self): - picking_type = self.env.ref("stock.picking_type_out") pickings = self.mapped("loaded_picking_ids").filtered( - lambda p: p.picking_type_id == picking_type and p.state != "cancel" + lambda p: p.picking_type_code == "outgoing" and p.state != "cancel" ) if pickings: return self.env.ref("stock.action_report_delivery").report_action(pickings) diff --git a/shipment_advice_cash_on_delivery/README.rst b/shipment_advice_cash_on_delivery/README.rst new file mode 100644 index 00000000..a800eaf7 --- /dev/null +++ b/shipment_advice_cash_on_delivery/README.rst @@ -0,0 +1,88 @@ +================================ +Shipment Advice Cash on Delivery +================================ + +.. + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! This file is generated by oca-gen-addon-readme !! + !! changes will be overwritten. !! + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + !! source digest: sha256:402231bc491adcd94e5edba386548075cb5aa8332caa2ca5843f7bea5ba88f0f + !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png + :target: https://odoo-community.org/page/development-status + :alt: Beta +.. |badge2| image:: https://img.shields.io/badge/licence-AGPL--3-blue.png + :target: http://www.gnu.org/licenses/agpl-3.0-standalone.html + :alt: License: AGPL-3 +.. |badge3| image:: https://img.shields.io/badge/github-OCA%2Fstock--logistics--transport-lightgray.png?logo=github + :target: https://github.com/OCA/stock-logistics-transport/tree/16.0/shipment_advice_cash_on_delivery + :alt: OCA/stock-logistics-transport +.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png + :target: https://translation.odoo-community.org/projects/stock-logistics-transport-16-0/stock-logistics-transport-16-0-shipment_advice_cash_on_delivery + :alt: Translate me on Weblate +.. |badge5| image:: https://img.shields.io/badge/runboat-Try%20me-875A7B.png + :target: https://runboat.odoo-community.org/builds?repo=OCA/stock-logistics-transport&target_branch=16.0 + :alt: Try me on Runboat + +|badge1| |badge2| |badge3| |badge4| |badge5| + +Allow to mark a payment mode as "cash on delivery". +When the picking is delivered, an invoice is automaticaly generated with the +amount to be paid. +Allows users to print cash on delivery invoices from a shipment advice + +**Table of contents** + +.. contents:: + :local: + +Configuration +============= + +You must mark a payment mode as "cash on delivery". + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +`feedback `_. + +Do not contact contributors directly about support or help with technical issues. + +Credits +======= + +Authors +~~~~~~~ + +* BCIM +* ACSONE SA/NV +* Camptocamp + +Contributors +~~~~~~~~~~~~ + +* Jacques-Etienne Baudoux +* Souheil Bejaoui +* Tuan Tran + +Maintainers +~~~~~~~~~~~ + +This module is maintained by the OCA. + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +This module is part of the `OCA/stock-logistics-transport `_ project on GitHub. + +You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute. diff --git a/shipment_advice_cash_on_delivery/__init__.py b/shipment_advice_cash_on_delivery/__init__.py new file mode 100644 index 00000000..0650744f --- /dev/null +++ b/shipment_advice_cash_on_delivery/__init__.py @@ -0,0 +1 @@ +from . import models diff --git a/shipment_advice_cash_on_delivery/__manifest__.py b/shipment_advice_cash_on_delivery/__manifest__.py new file mode 100644 index 00000000..59ae3f21 --- /dev/null +++ b/shipment_advice_cash_on_delivery/__manifest__.py @@ -0,0 +1,24 @@ +# Copyright 2018 Jacques-Etienne Baudoux (BCIM) +# Copyright 2023 ACSONE SA/NV +# Copyright 2024 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +{ + "name": "Shipment Advice Cash on Delivery", + "summary": """This module allows users to print cash on delivery invoices + from a shipment advice""", + "version": "16.0.1.0.0", + "license": "AGPL-3", + "author": "BCIM, ACSONE SA/NV, Camptocamp, Odoo Community Association (OCA)", + "website": "https://github.com/OCA/stock-logistics-transport", + "depends": [ + "account_payment_sale", + "shipment_advice", + "partner_invoicing_mode_at_shipping", + ], + "data": [ + "views/account_payment_mode_views.xml", + "views/shipment_advice.xml", + "views/stock_picking_views.xml", + ], +} diff --git a/shipment_advice_cash_on_delivery/models/__init__.py b/shipment_advice_cash_on_delivery/models/__init__.py new file mode 100644 index 00000000..4d956b2e --- /dev/null +++ b/shipment_advice_cash_on_delivery/models/__init__.py @@ -0,0 +1,3 @@ +from . import account_payment_mode +from . import shipment_advice +from . import stock_picking diff --git a/shipment_advice_cash_on_delivery/models/account_payment_mode.py b/shipment_advice_cash_on_delivery/models/account_payment_mode.py new file mode 100644 index 00000000..5725bd11 --- /dev/null +++ b/shipment_advice_cash_on_delivery/models/account_payment_mode.py @@ -0,0 +1,10 @@ +# Copyright 2018 Jacques-Etienne Baudoux (BCIM) + +from odoo import fields, models + + +class AccountPaymentMode(models.Model): + _inherit = "account.payment.mode" + + cash_on_delivery = fields.Boolean("Cash on Delivery") + auto_validate_invoice = fields.Boolean() diff --git a/shipment_advice_cash_on_delivery/models/shipment_advice.py b/shipment_advice_cash_on_delivery/models/shipment_advice.py new file mode 100644 index 00000000..95ad40e1 --- /dev/null +++ b/shipment_advice_cash_on_delivery/models/shipment_advice.py @@ -0,0 +1,20 @@ +# Copyright 2018 Jacques-Etienne Baudoux (BCIM) +# Copyright 2023 ACSONE SA/NV +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import models + + +class ShipmentAdvice(models.Model): + _inherit = "shipment.advice" + + def print_cash_on_delivery_invoices(self): + done_shipment_advices = self.filtered(lambda s: s.state == "done") + cod_invoices = done_shipment_advices.mapped("loaded_picking_ids").mapped( + "cash_on_delivery_invoice_ids" + ) + if cod_invoices: + return self.env.ref( + "account.account_invoices_without_payment" + ).report_action(cod_invoices) + return {} diff --git a/shipment_advice_cash_on_delivery/models/stock_picking.py b/shipment_advice_cash_on_delivery/models/stock_picking.py new file mode 100644 index 00000000..75e3ffe4 --- /dev/null +++ b/shipment_advice_cash_on_delivery/models/stock_picking.py @@ -0,0 +1,45 @@ +# Copyright 2018 Jacques-Etienne Baudoux (BCIM) +# Copyright 2023 ACSONE SA/NV +# Copyright 2024 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import fields, models + + +class StockPicking(models.Model): + _inherit = "stock.picking" + + cash_on_delivery_invoice_ids = fields.Many2many( + "account.move", string="COD Invoices", copy=False, readonly=True + ) + + def _invoice_at_shipping(self): + self.ensure_one() + res = super()._invoice_at_shipping() + res = res or self.sale_id.payment_mode_id.cash_on_delivery + return res + + def _invoicing_at_shipping_validation(self, invoices): + # COD invoices will be validated automatically + cod_invoices_to_validate = invoices.filtered( + lambda invoice: invoice.payment_mode_id.cash_on_delivery + and invoice.payment_mode_id.auto_validate_invoice + ) + # Non-COD invoices need to check in the call of `super` + invoices_to_validate = invoices.filtered( + lambda invoice: not invoice.payment_mode_id.cash_on_delivery + ) + res = super()._invoicing_at_shipping_validation(invoices_to_validate) + if cod_invoices_to_validate: + res |= cod_invoices_to_validate + return res + + def _invoicing_at_shipping(self): + self.ensure_one() + res = super()._invoicing_at_shipping() + if not isinstance(res, str): + cod_invoices = res.filtered( + lambda inv: inv.payment_mode_id.cash_on_delivery + ) + self.cash_on_delivery_invoice_ids = cod_invoices + return res diff --git a/shipment_advice_cash_on_delivery/readme/CONFIGURE.rst b/shipment_advice_cash_on_delivery/readme/CONFIGURE.rst new file mode 100644 index 00000000..5a85e16d --- /dev/null +++ b/shipment_advice_cash_on_delivery/readme/CONFIGURE.rst @@ -0,0 +1 @@ +You must mark a payment mode as "cash on delivery". diff --git a/shipment_advice_cash_on_delivery/readme/CONTRIBUTORS.rst b/shipment_advice_cash_on_delivery/readme/CONTRIBUTORS.rst new file mode 100644 index 00000000..e0ae8678 --- /dev/null +++ b/shipment_advice_cash_on_delivery/readme/CONTRIBUTORS.rst @@ -0,0 +1,3 @@ +* Jacques-Etienne Baudoux +* Souheil Bejaoui +* Tuan Tran diff --git a/shipment_advice_cash_on_delivery/readme/DESCRIPTION.rst b/shipment_advice_cash_on_delivery/readme/DESCRIPTION.rst new file mode 100644 index 00000000..047006f7 --- /dev/null +++ b/shipment_advice_cash_on_delivery/readme/DESCRIPTION.rst @@ -0,0 +1,4 @@ +Allow to mark a payment mode as "cash on delivery". +When the picking is delivered, an invoice is automaticaly generated with the +amount to be paid. +Allows users to print cash on delivery invoices from a shipment advice diff --git a/shipment_advice_cash_on_delivery/static/description/index.html b/shipment_advice_cash_on_delivery/static/description/index.html new file mode 100644 index 00000000..a0bfca03 --- /dev/null +++ b/shipment_advice_cash_on_delivery/static/description/index.html @@ -0,0 +1,435 @@ + + + + + +Shipment Advice Cash on Delivery + + + +
+

Shipment Advice Cash on Delivery

+ + +

Beta License: AGPL-3 OCA/stock-logistics-transport Translate me on Weblate Try me on Runboat

+

Allow to mark a payment mode as “cash on delivery”. +When the picking is delivered, an invoice is automaticaly generated with the +amount to be paid. +Allows users to print cash on delivery invoices from a shipment advice

+

Table of contents

+ +
+

Configuration

+

You must mark a payment mode as “cash on delivery”.

+
+
+

Bug Tracker

+

Bugs are tracked on GitHub Issues. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us to smash it by providing a detailed and welcomed +feedback.

+

Do not contact contributors directly about support or help with technical issues.

+
+
+

Credits

+
+

Authors

+
    +
  • BCIM
  • +
  • ACSONE SA/NV
  • +
  • Camptocamp
  • +
+
+
+

Contributors

+ +
+
+

Maintainers

+

This module is maintained by the OCA.

+ +Odoo Community Association + +

OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use.

+

This module is part of the OCA/stock-logistics-transport project on GitHub.

+

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.

+
+
+
+ + diff --git a/shipment_advice_cash_on_delivery/tests/__init__.py b/shipment_advice_cash_on_delivery/tests/__init__.py new file mode 100644 index 00000000..90b81209 --- /dev/null +++ b/shipment_advice_cash_on_delivery/tests/__init__.py @@ -0,0 +1 @@ +from . import test_shipment_advice_cash_on_delivery diff --git a/shipment_advice_cash_on_delivery/tests/test_shipment_advice_cash_on_delivery.py b/shipment_advice_cash_on_delivery/tests/test_shipment_advice_cash_on_delivery.py new file mode 100644 index 00000000..cc5d64f5 --- /dev/null +++ b/shipment_advice_cash_on_delivery/tests/test_shipment_advice_cash_on_delivery.py @@ -0,0 +1,231 @@ +# Copyright 2024 Jacques-Etienne Baudoux (BCIM) +# Copyright 2024 Camptocamp SA +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +from odoo import Command + +from odoo.addons.queue_job.tests.common import trap_jobs +from odoo.addons.shipment_advice.tests.common import Common + + +class TestShipmentAdviceCashOnDelivery(Common): + @classmethod + def setUpClass(cls): + super().setUpClass() + cls.uom_kg = cls.env.ref("uom.product_uom_kgm") + cls.product = cls.env["product.product"].create( + { + "name": "Product COD", + "type": "product", + } + ) + cls.warehouse = cls.env.ref("stock.warehouse0") + cls.company = cls.env.ref("base.main_company") + cls.manual_in = cls.env.ref("account.account_payment_method_manual_in") + cls.journal_c1 = cls.env["account.journal"].create( + { + "name": "J1", + "code": "J1", + "type": "bank", + "company_id": cls.company.id, + "bank_acc_number": "123456", + } + ) + + cls.payment_mode_normal = cls.env.ref( + "account_payment_mode.payment_mode_inbound_dd1" + ) + cls.payment_mode_cod = cls.env["account.payment.mode"].create( + { + "name": "COD", + "bank_account_link": "variable", + "payment_method_id": cls.manual_in.id, + "company_id": cls.company.id, + "fixed_journal_id": cls.journal_c1.id, + "variable_journal_ids": [(6, 0, [cls.journal_c1.id])], + "cash_on_delivery": True, + } + ) + cls.partner_standard = cls.env["res.partner"].create( + {"name": "partner_standard", "invoicing_mode": "standard"} + ) + cls.partner_at_shipping = cls.env["res.partner"].create( + {"name": "partner_at_shipping", "invoicing_mode": "at_shipping"} + ) + cls.company = cls.env.user.company_id + cls.default_pricelist = ( + cls.env["product.pricelist"] + .with_company(cls.company) + .create( + { + "name": "default_pricelist", + "currency_id": cls.company.currency_id.id, + } + ) + ) + cls.env["stock.quant"]._update_available_quantity( + cls.product, cls.warehouse.lot_stock_id, 3 + ) + + def _create_and_process_sale_order(self, dict_val): + # Create and confirm sale order + so = self.env["sale.order"].create(dict_val) + so.action_confirm() + pick = so.picking_ids + + # Process shipment advice & picking + shipment_advice = self.env["shipment.advice"].create( + {"shipment_type": "outgoing"} + ) + self._plan_records_in_shipment(shipment_advice, pick) + self._in_progress_shipment_advice(shipment_advice) + wiz = self._load_records_in_shipment(shipment_advice, pick) + self.assertEqual(wiz.picking_ids, pick) + self.assertFalse(wiz.move_line_ids) + pick.move_ids.write({"quantity_done": 1}) + with trap_jobs() as trap: + pick._action_done() + if trap.jobs_count() > 0: + trap.assert_enqueued_job( + pick._invoicing_at_shipping, + ) + trap.perform_enqueued_jobs() + shipment_advice.action_done() + self.assertEqual(shipment_advice.state, "done") + + return pick, shipment_advice + + def _check_picking_shipment(self, pick, shipment, partner): + self.assertEqual(len(pick.cash_on_delivery_invoice_ids), 1) + cod_invoice = pick.cash_on_delivery_invoice_ids[0] + self.assertEqual(cod_invoice.invoice_partner_display_name, partner.name) + action = shipment.with_context( + discard_logo_check=True + ).print_cash_on_delivery_invoices() + self.assertEqual(action.get("type"), "ir.actions.report") + self.assertEqual(action.get("report_name"), "account.report_invoice") + self.assertEqual(action.get("report_type"), "qweb-pdf") + self.assertEqual( + action.get("context").get("active_ids"), + pick.cash_on_delivery_invoice_ids.ids, + ) + + def test01(self): + """ + Create 1 SO with payment mode cash on delivery for partner without + invoicing at shipping + => Should be listed in picking.cash_on_delivery_invoice_ids + """ + pick, shipment = self._create_and_process_sale_order( + { + "partner_id": self.partner_standard.id, + "partner_invoice_id": self.partner_standard.id, + "partner_shipping_id": self.partner_standard.id, + "order_line": [ + Command.create( + { + "name": self.product.name, + "product_id": self.product.id, + "product_uom_qty": 1, + "product_uom": self.product.uom_id.id, + "price_unit": self.product.list_price, + }, + ), + ], + "pricelist_id": self.default_pricelist.id, + "picking_policy": "direct", + "payment_mode_id": self.payment_mode_cod.id, + } + ) + + self._check_picking_shipment(pick, shipment, self.partner_standard) + + def test02(self): + """ + Create 1 SO with payment mode cash on delivery for partner with + invoicing at shipping + => Should be listed in picking.cash_on_delivery_invoice_ids + """ + pick, shipment = self._create_and_process_sale_order( + { + "partner_id": self.partner_at_shipping.id, + "partner_invoice_id": self.partner_at_shipping.id, + "partner_shipping_id": self.partner_at_shipping.id, + "order_line": [ + Command.create( + { + "name": self.product.name, + "product_id": self.product.id, + "product_uom_qty": 1, + "product_uom": self.product.uom_id.id, + "price_unit": self.product.list_price, + }, + ), + ], + "pricelist_id": self.default_pricelist.id, + "picking_policy": "direct", + "payment_mode_id": self.payment_mode_cod.id, + } + ) + + self._check_picking_shipment(pick, shipment, self.partner_at_shipping) + + def test03(self): + """ + Create 1 SO without payment mode cash on delivery for partner with + invoicing at shipping + => Should NOT be listed in picking.cash_on_delivery_invoice_ids + """ + pick, dummy = self._create_and_process_sale_order( + { + "partner_id": self.partner_at_shipping.id, + "partner_invoice_id": self.partner_at_shipping.id, + "partner_shipping_id": self.partner_at_shipping.id, + "order_line": [ + Command.create( + { + "name": self.product.name, + "product_id": self.product.id, + "product_uom_qty": 2, + "product_uom": self.product.uom_id.id, + "price_unit": self.product.list_price, + }, + ), + ], + "pricelist_id": self.default_pricelist.id, + "picking_policy": "direct", + "payment_mode_id": self.payment_mode_normal.id, + } + ) + + self.assertEqual(len(pick.cash_on_delivery_invoice_ids), 0) + + def test04(self): + """ + Create 1 SO without payment mode cash on delivery for partner without + invoicing at shipping + => Should NOT be listed in picking.cash_on_delivery_invoice_ids + """ + pick, dummy = self._create_and_process_sale_order( + { + "partner_id": self.partner_standard.id, + "partner_invoice_id": self.partner_standard.id, + "partner_shipping_id": self.partner_standard.id, + "order_line": [ + Command.create( + { + "name": self.product.name, + "product_id": self.product.id, + "product_uom_qty": 2, + "product_uom": self.product.uom_id.id, + "price_unit": self.product.list_price, + }, + ), + ], + "pricelist_id": self.default_pricelist.id, + "picking_policy": "direct", + "payment_mode_id": self.payment_mode_normal.id, + } + ) + + self.assertEqual(len(pick.cash_on_delivery_invoice_ids), 0) diff --git a/shipment_advice_cash_on_delivery/views/account_payment_mode_views.xml b/shipment_advice_cash_on_delivery/views/account_payment_mode_views.xml new file mode 100644 index 00000000..0d0214ba --- /dev/null +++ b/shipment_advice_cash_on_delivery/views/account_payment_mode_views.xml @@ -0,0 +1,17 @@ + + + + cash on delivery + account.payment.mode + + + + + + + + + diff --git a/shipment_advice_cash_on_delivery/views/shipment_advice.xml b/shipment_advice_cash_on_delivery/views/shipment_advice.xml new file mode 100644 index 00000000..50f9a241 --- /dev/null +++ b/shipment_advice_cash_on_delivery/views/shipment_advice.xml @@ -0,0 +1,30 @@ + + + + + Print COD Invoice + + + code + action = records.print_cash_on_delivery_invoices() + + + + + shipment.advice.view.form.inherit + shipment.advice + + +
+
+
+
+ +
diff --git a/shipment_advice_cash_on_delivery/views/stock_picking_views.xml b/shipment_advice_cash_on_delivery/views/stock_picking_views.xml new file mode 100644 index 00000000..d67fbcbf --- /dev/null +++ b/shipment_advice_cash_on_delivery/views/stock_picking_views.xml @@ -0,0 +1,20 @@ + + + + cash on delivery + stock.picking + + + + + + + +