cancel feature

This commit is contained in:
Raman Marikanti 2026-01-02 17:50:34 +05:30
parent e8611ad9e4
commit 255e8601ce
75 changed files with 1681 additions and 0 deletions

View File

@ -0,0 +1,5 @@
# -*- coding: utf-8 -*-
# Part of Odoo Module Developed by CandidRoot Solutions Pvt. Ltd.
# See LICENSE file for full copyright and licensing details.
from . import models

View File

@ -0,0 +1,72 @@
# -*- coding: utf-8 -*-
# Part of Odoo Module Developed by CandidRoot Solutions Pvt. Ltd.
# See LICENSE file for full copyright and licensing details.
{
'name': "Cancellation Order Feature",
'category': 'Sales/Sales',
'summary': """ Cancellation Feature for Sales Order, Purchase Order, Inventory and Invoice.""",
'version': '18.0.0.0',
'author': "CandidRoot Solutions Pvt. Ltd.",
'website': 'https://www.candidroot.com/',
'sequence': 2,
'description': """ This module will help you to do the following things in simple way.
--- You need to configure the options available in Sales/Configuration/Settings and Purchase/Configuration/Setting ---.
Sale
------------------------
> You can cancel a Sale order, once it is confirmed.
> After cancellation of order, product quantity will be reverted in inventory.
NOTE --> ( If you enabled the [Cancel Delivery Order] option in Sale's configuration then the quantity will be affected,
otherwise only Sale order will be cancelled.)
> You can cancel multiple Sale orders in one click.
> You can cancel sale's invoice
NOTE --> ( If you enabled the [Cancel Invoice and Payment] option in Sale configuration then invoice
will be cancelled.)
Purchase
------------------------
> You can cancel a Purchase order, once it is confirmed.
> After cancellation of order, product quantity will be revert in inventory.
NOTE --> ( If you checked [Cancel Receipt Order] option in Purchase configuration then the quantity will be affected,
otherwise only Purchase order will cancel.)
> You can cancel multiple Purchase orders in one click.
> You can cancel Purchase's invoice
NOTE --> ( If you checked [Cancel Bill] option in Purchase's configuration then invoice
will cancel.)
Inventory
------------------------
> You can cancel Delivery order, Receipt and Internal Transfer which are in done state only.
> NOTE --> ( If you checked [Stock Picking Cancel Operation Type] option in Inventory configuration
then it will be cancelled.)
> You can cancel multiple Delivery order, Receipt and Internal Transfer in one click.
> You can cancel multiple Stock moves.
> NOTE --> You can find stock move from (Inventory > Reporting > Stock Moves)
Invoice
------------------------
> You can cancel Invoice/Bill which are in Posted state.
> If you cancel a Invoice/Bill then corresponding payment will also be cancelled if payment is in posted state.
> You can also cancel Payment which are already Posted.
""",
'depends': ["base", "sale_stock", "account", "sale_management", "sale", "purchase"],
'data': [
'security/security.xml',
'data/ir_actions_server.xml',
'views/stock_view.xml',
'views/invoice_view.xml',
'views/sale_settings_view.xml',
'views/purchase_settings_view.xml',
'views/inventory_settings_view.xml',
'views/invoice_settings_view.xml',
],
'qweb': [],
'images': ['static/description/banner.jpeg'],
'installable': True,
'live_test_url': 'https://youtu.be/Ibq81e7GRSQ',
'license': 'LGPL-3',
'auto_install': False,
'application': False,
}

View File

@ -0,0 +1,173 @@
<?xml version="1.0" encoding="UTF-8"?>
<odoo>
<data>
<!-- SALE ORDER SERVER ACTIONS-->
<record id="action_server_sale_cancel" model="ir.actions.server">
<field name="name">Sale Order Cancel</field>
<field name="type">ir.actions.server</field>
<field name="model_id" ref="model_sale_order" />
<field name="binding_model_id" ref="model_sale_order" />
<field name="state">code</field>
<field name="code">records.so_cancel_server_action_method()</field>
<field name="groups_id" eval="[(4,ref('cancellation_feature_cr.group_cancellation_sale_orders'))]"/>
</record>
<record id="action_server_sale_draft_cancel" model="ir.actions.server">
<field name="name">Sale Order Cancel &amp; Draft </field>
<field name="type">ir.actions.server</field>
<field name="model_id" ref="model_sale_order" />
<field name="binding_model_id" ref="model_sale_order" />
<field name="state">code</field>
<field name="code">records.so_cancel_draft_server_action_method()</field>
<field name="groups_id" eval="[(4,ref('cancellation_feature_cr.group_cancellation_sale_orders'))]"/>
</record>
<record id="action_server_sale_delete_cancel" model="ir.actions.server">
<field name="name">Sale Order Cancel &amp; Delete </field>
<field name="type">ir.actions.server</field>
<field name="model_id" ref="model_sale_order" />
<field name="binding_model_id" ref="model_sale_order" />
<field name="state">code</field>
<field name="code">action = records.so_cancel_delete_server_action_method()</field>
<field name="groups_id" eval="[(4,ref('cancellation_feature_cr.group_cancellation_sale_orders'))]"/>
</record>
<!-- PURCHASE ORDER SERVER ACTIONS-->
<record id="action_server_purchase_cancel" model="ir.actions.server">
<field name="name">Purchase Order Cancel</field>
<field name="type">ir.actions.server</field>
<field name="model_id" ref="model_purchase_order" />
<field name="binding_model_id" ref="model_purchase_order" />
<field name="state">code</field>
<field name="code">records.po_cancel_server_action_method()</field>
<field name="groups_id" eval="[(4,ref('cancellation_feature_cr.group_cancellation_purchase_orders'))]"/>
</record>
<record id="action_server_purchase_draft_cancel" model="ir.actions.server">
<field name="name">Purchase Order Cancel &amp; Draft </field>
<field name="type">ir.actions.server</field>
<field name="model_id" ref="model_purchase_order" />
<field name="binding_model_id" ref="model_purchase_order" />
<field name="state">code</field>
<field name="code">records.po_cancel_draft_server_action_method()</field>
<field name="groups_id" eval="[(4,ref('cancellation_feature_cr.group_cancellation_purchase_orders'))]"/>
</record>
<record id="action_server_purchase_delete_cancel" model="ir.actions.server">
<field name="name">Purchase Order Cancel &amp; Delete </field>
<field name="type">ir.actions.server</field>
<field name="model_id" ref="model_purchase_order" />
<field name="binding_model_id" ref="model_purchase_order" />
<field name="state">code</field>
<field name="code">action = records.po_cancel_delete_server_action_method()</field>
<field name="groups_id" eval="[(4,ref('cancellation_feature_cr.group_cancellation_purchase_orders'))]"/>
</record>
<!-- INVENTORY SERVER ACTIONS-->
<record id="action_server_stock_cancel" model="ir.actions.server">
<field name="name">Stock Form Cancel</field>
<field name="type">ir.actions.server</field>
<field name="model_id" ref="model_stock_picking" />
<field name="binding_model_id" ref="model_stock_picking" />
<field name="state">code</field>
<field name="code">records.stock_picking_cancel_server_action_method()</field>
<field name="groups_id" eval="[(4,ref('cancellation_feature_cr.group_cancellation_inventory_orders'))]"/>
</record>
<record id="action_server_stock_draft_cancel" model="ir.actions.server">
<field name="name">Stock Form Cancel &amp; Draft </field>
<field name="type">ir.actions.server</field>
<field name="model_id" ref="model_stock_picking" />
<field name="binding_model_id" ref="model_stock_picking" />
<field name="state">code</field>
<field name="code">records.stock_picking_cancel_draft_server_action_method()</field>
<field name="groups_id" eval="[(4,ref('cancellation_feature_cr.group_cancellation_inventory_orders'))]"/>
</record>
<record id="action_server_picking_delete_cancel" model="ir.actions.server">
<field name="name">Stock Form Cancel &amp; Delete </field>
<field name="type">ir.actions.server</field>
<field name="model_id" ref="model_stock_picking" />
<field name="binding_model_id" ref="model_stock_picking" />
<field name="state">code</field>
<field name="code">action = records.stock_picking_cancel_delete_server_action_method()</field>
<field name="groups_id" eval="[(4,ref('cancellation_feature_cr.group_cancellation_inventory_orders'))]"/>
</record>
<!-- STOCK MOVE SERVER ACTIONS-->
<record id="action_server_stockmove_cancel" model="ir.actions.server">
<field name="name">Stock Move Cancel</field>
<field name="type">ir.actions.server</field>
<field name="model_id" ref="model_stock_move" />
<field name="binding_model_id" ref="model_stock_move" />
<field name="state">code</field>
<field name="code">records.stock_move_cancel_server_action_method()</field>
<field name="groups_id" eval="[(4,ref('cancellation_feature_cr.group_cancellation_inventory_orders'))]"/>
</record>
<record id="action_server_stockmove_draft_cancel" model="ir.actions.server">
<field name="name">Stock Move Cancel &amp; Draft </field>
<field name="type">ir.actions.server</field>
<field name="model_id" ref="model_stock_move" />
<field name="binding_model_id" ref="model_stock_move" />
<field name="state">code</field>
<field name="code">records.stock_move_cancel_draft_server_action_method()</field>
<field name="groups_id" eval="[(4,ref('cancellation_feature_cr.group_cancellation_inventory_orders'))]"/>
</record>
<record id="action_server_stockmove_delete_cancel" model="ir.actions.server">
<field name="name">Stock Move Cancel &amp; Delete </field>
<field name="type">ir.actions.server</field>
<field name="model_id" ref="model_stock_move" />
<field name="binding_model_id" ref="model_stock_move" />
<field name="state">code</field>
<field name="code">action = records.stock_move_cancel_delete_server_action_method()</field>
<field name="groups_id" eval="[(4,ref('cancellation_feature_cr.group_cancellation_inventory_orders'))]"/>
</record>
<!-- INVOICE ACCOUNT MOVE SERVER ACTIONS-->
<record id="action_server_invoice_cancel" model="ir.actions.server">
<field name="name">Invoice Cancel</field>
<field name="type">ir.actions.server</field>
<field name="model_id" ref="model_account_move" />
<field name="binding_model_id" ref="model_account_move" />
<field name="state">code</field>
<field name="code">records.account_move_cancel_server_action_method()</field>
<field name="groups_id" eval="[(4,ref('cancellation_feature_cr.group_cancellation_invoice_orders'))]"/>
</record>
<record id="action_server_invoice_draft_cancel" model="ir.actions.server">
<field name="name">Invoice Cancel &amp; Draft </field>
<field name="type">ir.actions.server</field>
<field name="model_id" ref="model_account_move" />
<field name="binding_model_id" ref="model_account_move" />
<field name="state">code</field>
<field name="code">records.account_move_cancel_draft_server_action_method()</field>
<field name="groups_id" eval="[(4,ref('cancellation_feature_cr.group_cancellation_invoice_orders'))]"/>
</record>
<record id="action_server_invoice_delete_cancel" model="ir.actions.server">
<field name="name">Invoice Cancel &amp; Delete </field>
<field name="type">ir.actions.server</field>
<field name="model_id" ref="model_account_move" />
<field name="binding_model_id" ref="model_account_move" />
<field name="state">code</field>
<field name="code">action = records.account_move_cancel_delete_server_action_method()</field>
<field name="groups_id" eval="[(4,ref('cancellation_feature_cr.group_cancellation_invoice_orders'))]"/>
</record>
<!-- INVOICE ACCOUNT PAYMENT SERVER ACTIONS-->
<record id="action_server_invoice_payment_cancel" model="ir.actions.server">
<field name="name">Payment Cancel</field>
<field name="type">ir.actions.server</field>
<field name="model_id" ref="model_account_payment" />
<field name="binding_model_id" ref="model_account_payment" />
<field name="state">code</field>
<field name="code">records.account_payment_cancel_server_action_method()</field>
<field name="groups_id" eval="[(4,ref('cancellation_feature_cr.group_cancellation_invoice_orders'))]"/>
</record>
<record id="action_server_invoice_payment_draft_cancel" model="ir.actions.server">
<field name="name">Payment Cancel &amp; Draft </field>
<field name="type">ir.actions.server</field>
<field name="model_id" ref="model_account_payment" />
<field name="binding_model_id" ref="model_account_payment" />
<field name="state">code</field>
<field name="code">records.account_payment_cancel_draft_server_action_method()</field>
<field name="groups_id" eval="[(4,ref('cancellation_feature_cr.group_cancellation_invoice_orders'))]"/>
</record>
<record id="action_server_invoice_payment_delete_cancel" model="ir.actions.server">
<field name="name">Payment Cancel &amp; Delete </field>
<field name="type">ir.actions.server</field>
<field name="model_id" ref="model_account_payment" />
<field name="binding_model_id" ref="model_account_payment" />
<field name="state">code</field>
<field name="code">action = records.account_payment_cancel_delete_server_action_method()</field>
<field name="groups_id" eval="[(4,ref('cancellation_feature_cr.group_cancellation_invoice_orders'))]"/>
</record>
</data>
</odoo>

View File

@ -0,0 +1,11 @@
# -*- coding: utf-8 -*-
# Part of Odoo Module Developed by CandidRoot Solutions Pvt. Ltd.
# See LICENSE file for full copyright and licensing details.
from . import sale_order
from . import res_config_settings
from . import purchase_order
from . import stock_picking
from . import stock_move
from . import account_move
from . import account_payment

View File

@ -0,0 +1,71 @@
# -*- coding: utf-8 -*-
# Part of Odoo Module Developed by CandidRoot Solutions Pvt. Ltd.
# See LICENSE file for full copyright and licensing details.
from odoo import models, fields, api, _
class AccountMove(models.Model):
_inherit = "account.move"
def action_for_all_operations(self, invoice_cancel_type):
account_payment_object = self.env['account.payment'].sudo()
for rec in self:
payments = account_payment_object.search([('ref', '=', rec.name), ('state', '=', 'posted')])
if invoice_cancel_type == 'cancel':
for payment in payments:
payment.state = 'draft'
payment.state = 'cancel'
rec.button_draft()
# rec.button_cancel()
elif invoice_cancel_type == 'cancel_reset':
for payment in payments:
payment.state = 'draft'
payment.state = 'cancel'
rec.button_draft()
elif invoice_cancel_type == 'cancel_delete':
for payment in payments:
payment.action_draft()
payment.action_cancel()
payment.unlink()
rec.state = 'draft'
rec.state = 'cancel'
rec.write({'name': ''})
rec.unlink()
# CANCEL BUTTON METHOD
def button_cancel(self):
invoice_cancel_type = self.env['ir.config_parameter'].sudo().get_param(
'cancellation_feature_cr.invoice_cancel_type')
self.action_for_all_operations(invoice_cancel_type)
if invoice_cancel_type == 'cancel_delete':
action = self.env["ir.actions.act_window"]._for_xml_id('account.action_move_out_invoice_type')
action['tag'] = 'reload'
return action
if invoice_cancel_type and not invoice_cancel_type == 'cancel_reset' or not invoice_cancel_type:
res = super(AccountMove, self).button_cancel()
return res
# SERVER ACTIONS METHODS
def account_move_cancel_server_action_method(self):
invoice_cancel_type = 'cancel'
self.action_for_all_operations(invoice_cancel_type)
def account_move_cancel_draft_server_action_method(self):
invoice_cancel_type = 'cancel_reset'
self.action_for_all_operations(invoice_cancel_type)
def account_move_cancel_delete_server_action_method(self):
invoice_cancel_type = 'cancel_delete'
self.action_for_all_operations(invoice_cancel_type)
if invoice_cancel_type == 'cancel_delete':
action = self.env["ir.actions.act_window"]._for_xml_id('account.action_move_out_invoice_type')
return action

View File

@ -0,0 +1,64 @@
# -*- coding: utf-8 -*-
# Part of Odoo Module Developed by CandidRoot Solutions Pvt. Ltd.
# See LICENSE file for full copyright and licensing details.
from odoo import models, fields, api, _
class AccountPayment(models.Model):
_inherit = "account.payment"
def action_for_all_operations(self, payment_cancel_type):
account_move_obj = self.env['account.move'].sudo()
for rec in self:
invoice = account_move_obj.search([('name', '=', rec.ref)])
if payment_cancel_type == 'cancel':
if rec.state == 'posted':
rec.state = 'draft'
rec.state = 'cancel'
invoice.button_draft()
invoice.button_cancel()
elif payment_cancel_type == 'cancel_reset':
if rec.state == 'posted':
rec.action_draft()
invoice.button_draft()
elif payment_cancel_type == 'cancel_delete':
if rec.state == 'posted':
rec.action_draft()
rec.action_cancel()
invoice.button_draft()
invoice.state = 'cancel'
rec.unlink()
# CANCEL BUTTON METHOD
def action_cancel(self):
payment_cancel_type = self.env['ir.config_parameter'].sudo().get_param(
'cancellation_feature_cr.payment_cancel_type')
self.action_for_all_operations(payment_cancel_type)
if payment_cancel_type == 'cancel_delete':
action = self.env["ir.actions.act_window"]._for_xml_id('account.action_account_payments')
action['tag'] = 'reload'
return action
# SERVER ACTIONS METHODS
def account_payment_cancel_server_action_method(self):
payment_cancel_type = 'cancel'
self.action_for_all_operations(payment_cancel_type)
def account_payment_cancel_draft_server_action_method(self):
payment_cancel_type = 'cancel_reset'
self.action_for_all_operations(payment_cancel_type)
def account_payment_cancel_delete_server_action_method(self):
payment_cancel_type = 'cancel_delete'
self.action_for_all_operations(payment_cancel_type)
if payment_cancel_type == 'cancel_delete':
action = self.env["ir.actions.act_window"]._for_xml_id('account.action_account_payments')
return action

View File

@ -0,0 +1,94 @@
# -*- coding: utf-8 -*-
# Part of Odoo Module Developed by CandidRoot Solutions Pvt. Ltd.
# See LICENSE file for full copyright and licensing details.
from odoo import models, fields, api, _
class PurchaseOrder(models.Model):
_inherit = "purchase.order"
def _cancel_order(self):
self.write({'state': 'cancel'})
def _draft_order(self):
self.write({'state': 'draft'})
def action_for_all_operations(self, po_cancel_type, cancel_receipt_order, cancel_bill_payment):
for rec in self:
# CANCELLING RECEIPT AND DEDUCT QUANTITYS
if cancel_receipt_order == 'True':
picking = self.picking_ids.filtered(lambda a: a.state == 'done')
for pick in picking:
for move_line in pick.move_ids_without_package:
move_line.quantity = 0
move_line.state = 'draft'
move_line.unlink()
for move in pick.move_ids_without_package:
move.state = 'draft'
move.is_locked = False
pick.state = 'cancel'
if cancel_bill_payment == 'True':
account_payment_object = self.env['account.payment'].sudo()
invoices = self.invoice_ids.filtered(lambda a: a.state == 'posted')
for invoice in invoices:
payments = account_payment_object.search([('ref', '=', invoice.name), ('state', '=', 'posted')])
invoice.state = 'cancel'
payments.state = 'cancel'
# CANCELLATION TYPES
if po_cancel_type == 'cancel':
rec._cancel_order()
elif po_cancel_type == 'cancel_reset':
rec._draft_order()
elif po_cancel_type == 'cancel_delete':
rec._cancel_order()
# BUTTON METHOD
def button_cancel(self):
po_cancel_type = self.env['ir.config_parameter'].sudo().get_param('cancellation_feature_cr.po_cancel_type')
cancel_receipt_order = self.env['ir.config_parameter'].sudo().get_param(
'cancellation_feature_cr.cancel_receipt_order')
cancel_bill_payment = self.env['ir.config_parameter'].sudo().get_param(
'cancellation_feature_cr.cancel_bill_payment')
self.action_for_all_operations(po_cancel_type, cancel_receipt_order, cancel_bill_payment)
if po_cancel_type == 'cancel_delete':
self.unlink()
action = self.env["ir.actions.act_window"]._for_xml_id('purchase.purchase_rfq')
action['tag'] = 'reload'
return action
if po_cancel_type and not po_cancel_type == 'cancel_reset' or not po_cancel_type:
res = super(PurchaseOrder, self).button_cancel()
return res
# SERVER ACTIONS METHODS
def po_cancel_server_action_method(self):
po_cancel_type = 'cancel'
cancel_receipt_order = self.env['ir.config_parameter'].sudo().get_param('cancellation_feature_cr.cancel_receipt_order')
cancel_bill_payment = self.env['ir.config_parameter'].sudo().get_param('cancellation_feature_cr.cancel_bill_payment')
self.action_for_all_operations(po_cancel_type,cancel_receipt_order,cancel_bill_payment)
def po_cancel_draft_server_action_method(self):
po_cancel_type = 'cancel_reset'
cancel_receipt_order = self.env['ir.config_parameter'].sudo().get_param('cancellation_feature_cr.cancel_receipt_order')
cancel_bill_payment = self.env['ir.config_parameter'].sudo().get_param('cancellation_feature_cr.cancel_bill_payment')
self.action_for_all_operations(po_cancel_type, cancel_receipt_order, cancel_bill_payment)
def po_cancel_delete_server_action_method(self):
po_cancel_type = 'cancel_delete'
cancel_receipt_order = self.env['ir.config_parameter'].sudo().get_param('cancellation_feature_cr.cancel_receipt_order')
cancel_bill_payment = self.env['ir.config_parameter'].sudo().get_param('cancellation_feature_cr.cancel_bill_payment')
self.action_for_all_operations(po_cancel_type, cancel_receipt_order, cancel_bill_payment)
self.unlink()
action = self.env["ir.actions.act_window"]._for_xml_id('purchase.purchase_rfq')
action['tag'] = 'reload'
return action

View File

@ -0,0 +1,53 @@
# -*- coding: utf-8 -*-
# Part of Odoo Module Developed by CandidRoot Solutions Pvt. Ltd.
# See LICENSE file for full copyright and licensing details.
from odoo import models, fields, api, _
class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"
# SALE ORDER RELATED FIELDS
so_cancel_type = fields.Selection([('cancel', 'Cancel Only'), ('cancel_reset', 'Cancel and Reset to Draft'),
('cancel_delete', 'Cancel and Delete')],
'Sale Order Cancel Operation Type',
config_parameter='cancellation_feature_cr.so_cancel_type')
cancel_do = fields.Boolean(string='Cancel Delivery Order', config_parameter='cancellation_feature_cr.cancel_do')
cancel_invoice_payment = fields.Boolean(string='Cancel Invoice and Payment',
config_parameter='cancellation_feature_cr.cancel_invoice_payment')
# PURCHASE ORDER RELATED FIELDS
po_cancel_type = fields.Selection([('cancel', 'Cancel Only'), ('cancel_reset', 'Cancel and Reset to Draft'),
('cancel_delete', 'Cancel and Delete')],
'Purchase Order Cancel Operation Type',
config_parameter='cancellation_feature_cr.po_cancel_type')
cancel_receipt_order = fields.Boolean(string='Cancel Receipt Order',
config_parameter='cancellation_feature_cr.cancel_receipt_order')
cancel_bill_payment = fields.Boolean(string='Cancel Bill',
config_parameter='cancellation_feature_cr.cancel_bill_payment')
# INVENTORY RELATED FIELDS
# ---* STOCK PICKING OPERATIONS
stock_picking_cancel_type = fields.Selection(
[('cancel', 'Cancel Only'), ('cancel_reset', 'Cancel and Reset to Draft'),
('cancel_delete', 'Cancel and Delete')],
'Stock Picking Cancel Operation Type',
config_parameter='cancellation_feature_cr.stock_picking_cancel_type')
# INVOICE / ACCOUNT RELATED FIELDS
# ---* ACCOUNT MOVE OPERATIONS
invoice_cancel_type = fields.Selection(
[('cancel', 'Cancel Only'), ('cancel_reset', 'Cancel and Reset to Draft'),
('cancel_delete', 'Cancel and Delete')],
'Invoice Cancel Operation Type',
config_parameter='cancellation_feature_cr.invoice_cancel_type')
payment_cancel_type = fields.Selection(
[('cancel', 'Cancel Only'), ('cancel_reset', 'Cancel and Reset to Draft'),
('cancel_delete', 'Cancel and Delete')],
'Payment Cancel Operation Type',
config_parameter='cancellation_feature_cr.payment_cancel_type')

View File

@ -0,0 +1,97 @@
# -*- coding: utf-8 -*-
# Part of Odoo Module Developed by CandidRoot Solutions Pvt. Ltd.
# See LICENSE file for full copyright and licensing details.
from odoo import models, fields, api, _
class SaleOrder(models.Model):
_inherit = "sale.order"
def _cancel_order(self):
self.write({'state': 'cancel'})
def _draft_order(self):
self.write({'state': 'draft'})
def action_for_all_operations(self, so_cancel_type, cancel_delivery, cancel_invoice_payment):
for rec in self:
# CANCELLING OF DONE DELIVERY ORDER AND BRING QUANTITIES
if cancel_delivery == 'True':
picking = rec.picking_ids.filtered(lambda a: a.state == 'done')
for pick in rec.picking_ids:
for move in pick.move_ids_without_package:
move.quantity = 0
move.state = 'draft'
move.unlink()
for move in pick.move_ids_without_package:
move.state = 'draft'
move.is_locked = False
pick.do_unreserve()
pick.action_cancel()
if cancel_invoice_payment == 'True':
account_payment_object = self.env['account.payment'].sudo()
invoices = self.invoice_ids.filtered(lambda a: a.state == 'posted')
for invoice in invoices:
payments = account_payment_object.search([('ref', '=', invoice.name), ('state', '=', 'posted')])
invoice.state = 'cancel'
payments.state = 'cancel'
# CANCELLATION TYPES
if so_cancel_type == 'cancel':
rec._cancel_order()
elif so_cancel_type == 'cancel_reset':
rec._draft_order()
elif so_cancel_type == 'cancel_delete':
rec._cancel_order()
# BUTTON METHOD
def _action_cancel(self):
so_cancel_type = self.env['ir.config_parameter'].sudo().get_param('cancellation_feature_cr.so_cancel_type')
cancel_delivery = self.env['ir.config_parameter'].sudo().get_param('cancellation_feature_cr.cancel_do')
cancel_invoice_payment = self.env['ir.config_parameter'].sudo().get_param(
'cancellation_feature_cr.cancel_invoice_payment')
self.action_for_all_operations(so_cancel_type, cancel_delivery, cancel_invoice_payment)
if so_cancel_type == 'cancel_delete':
action = self.env["ir.actions.act_window"]._for_xml_id('sale.action_quotations_with_onboarding')
action['tag'] = 'reload'
self.unlink()
return action
if so_cancel_type and not so_cancel_type == 'cancel_reset' or not so_cancel_type:
res = super(SaleOrder, self)._action_cancel()
return res
# SERVER ACTIONS METHODS
def so_cancel_server_action_method(self):
so_cancel_type = 'cancel'
cancel_delivery = self.env['ir.config_parameter'].sudo().get_param('cancellation_feature_cr.cancel_do')
cancel_invoice_payment = self.env['ir.config_parameter'].sudo().get_param(
'cancellation_feature_cr.cancel_invoice_payment')
self.action_for_all_operations(so_cancel_type, cancel_delivery, cancel_invoice_payment)
def so_cancel_draft_server_action_method(self):
so_cancel_type = 'cancel_reset'
cancel_delivery = self.env['ir.config_parameter'].sudo().get_param('cancellation_feature_cr.cancel_do')
cancel_invoice_payment = self.env['ir.config_parameter'].sudo().get_param(
'cancellation_feature_cr.cancel_invoice_payment')
self.action_for_all_operations(so_cancel_type, cancel_delivery, cancel_invoice_payment)
def so_cancel_delete_server_action_method(self):
so_cancel_type = 'cancel_delete'
cancel_delivery = self.env['ir.config_parameter'].sudo().get_param('cancellation_feature_cr.cancel_do')
cancel_invoice_payment = self.env['ir.config_parameter'].sudo().get_param(
'cancellation_feature_cr.cancel_invoice_payment')
self.action_for_all_operations(so_cancel_type, cancel_delivery, cancel_invoice_payment)
self.unlink()
action = self.env["ir.actions.act_window"]._for_xml_id('sale.action_quotations_with_onboarding')
action['tag'] = 'reload'
return action

View File

@ -0,0 +1,142 @@
# -*- coding: utf-8 -*-
# Part of Odoo Module Developed by CandidRoot Solutions Pvt. Ltd.
# See LICENSE file for full copyright and licensing details.
from odoo import models, fields, api, _
class StockMove(models.Model):
_inherit = "stock.move"
def _action_cancel_move(self):
self.write({'state': 'cancel'})
def _action_draft_move(self):
self.write({'state': 'draft'})
def action_for_all_operations(self, stock_picking_cancel_type):
for rec in self:
if stock_picking_cancel_type == 'cancel':
rec._action_cancel_move()
elif stock_picking_cancel_type == 'cancel_reset':
rec._action_draft_move()
elif stock_picking_cancel_type == 'cancel_delete':
rec._action_draft_move()
rec.unlink()
def set_stock_quant_quantity(self, move_qty, stock_move):
stock_quant_object = self.env['stock.quant']
product = stock_move.product_id
if stock_move.product_id.tracking == 'none':
out_stock_quant = stock_quant_object.sudo().search(
[('product_id', '=', product.id), ('location_id', '=', stock_move.location_id.id)])
if not out_stock_quant:
out_stock_quant = stock_quant_object.sudo().create({
'product_id': product and product.id or False,
'location_id': stock_move.location_id and stock_move.location_id.id or False,
'quantity': 0,
'product_uom_id': stock_move.product_uom and stock_move.product_uom.id or False,
})
if out_stock_quant:
out_stock_quant[0].quantity = out_stock_quant[0].quantity + move_qty
if out_stock_quant[0].quantity == 0:
out_stock_quant[0].unlink()
out_stock_quant = stock_quant_object.sudo().search(
[('product_id', '=', product.id), ('location_id', '=', stock_move.location_dest_id.id)])
if not out_stock_quant:
out_stock_quant = stock_quant_object.sudo().create({
'product_id': product and product.id or False,
'location_id': stock_move.location_id and stock_move.location_id.id or False,
'quantity': 0,
'product_uom_id': stock_move.product_uom and stock_move.product_uom.id or False,
})
if out_stock_quant:
out_stock_quant[0].quantity = out_stock_quant[0].quantity - move_qty
if out_stock_quant[0].quantity == 0:
out_stock_quant[0].unlink()
else:
for line in stock_move.move_line_ids:
out_stock_quant = stock_quant_object.sudo().search(
[('product_id', '=', product.id), ('location_id', '=', stock_move.location_id.id),
('lot_id', '=', line.lot_id.id)])
if not out_stock_quant:
out_stock_quant = stock_quant_object.sudo().create({
'product_id': product and product.id or False,
'location_id': stock_move.location_id and stock_move.location_id.id or False,
'quantity': 0,
'product_uom_id': stock_move.product_uom and stock_move.product_uom.id or False,
'lot_id': line.lot_id and line.lot_id.id or False,
})
if out_stock_quant:
out_stock_quant[0].quantity = out_stock_quant[0].quantity + line.qty_done
if out_stock_quant[0].quantity == 0:
out_stock_quant[0].unlink()
out_stock_quant = stock_quant_object.sudo().search(
[('product_id', '=', product.id), ('location_id', '=', stock_move.location_dest_id.id),
('lot_id', '=', line.lot_id.id)])
if not out_stock_quant:
out_stock_quant = stock_quant_object.sudo().create({
'product_id': product and product.id or False,
'location_id': stock_move.location_id and stock_move.location_id.id or False,
'quantity': 0,
'product_uom_id': stock_move.product_uom and stock_move.product_uom.id or False,
'lot_id': line.lot_id and line.lot_id.id or False,
})
if out_stock_quant:
out_stock_quant[0].quantity = out_stock_quant[0].quantity - line.qty_done
if out_stock_quant[0].quantity == 0:
out_stock_quant[0].unlink()
def set_order_line_quantity(self, stock_move, pick_operation_ids, picking_state):
for pack_operation_id in pick_operation_ids:
move_qty = stock_move.product_uom_qty
if stock_move.quantity_done:
move_qty = stock_move.quantity_done
if stock_move.quantity_done:
if stock_move.sale_line_id:
if stock_move.sale_line_id.qty_delivered >= move_qty:
stock_move.sale_line_id.qty_delivered = stock_move.sale_line_id.qty_delivered - move_qty
if stock_move.purchase_line_id:
if stock_move.purchase_line_id.qty_received >= move_qty:
stock_move.purchase_line_id.qty_received = stock_move.purchase_line_id.qty_received - move_qty
if stock_move.product_id.type == 'product':
self.set_stock_quant_quantity(move_qty, stock_move)
def _fetch_pickings(self):
for move in self:
picking_state = move.picking_id.state
if move.picking_id.state != 'done':
move._do_unreserve()
if move.picking_id.state == 'done' or 'confirmed' and move.picking_id.picking_type_id.code in ['incoming',
'outgoing']:
pickings = self.env['stock.move'].sudo().search(
[('picking_id', '=', move.picking_id.id), ('product_id', '=', move.product_id.id)])
self.set_order_line_quantity(move, pickings, picking_state)
def stock_move_cancel_server_action_method(self):
stock_picking_cancel_type = 'cancel'
self._fetch_pickings()
self.action_for_all_operations(stock_picking_cancel_type)
def stock_move_cancel_draft_server_action_method(self):
stock_picking_cancel_type = 'cancel_reset'
self._fetch_pickings()
self.action_for_all_operations(stock_picking_cancel_type)
def stock_move_cancel_delete_server_action_method(self):
stock_picking_cancel_type = 'cancel_delete'
self._fetch_pickings()
self.action_for_all_operations(stock_picking_cancel_type)
action = self.env["ir.actions.act_window"]._for_xml_id('stock.stock_move_action')
return action

View File

@ -0,0 +1,66 @@
# -*- coding: utf-8 -*-
# Part of Odoo Module Developed by CandidRoot Solutions Pvt. Ltd.
# See LICENSE file for full copyright and licensing details.
from odoo import models, fields, api, _
class Picking(models.Model):
_inherit = "stock.picking"
def _action_cancel(self):
self.write({'state': 'cancel'})
def _action_draft(self):
self.write({'state': 'draft'})
def action_for_all_operations(self, stock_picking_cancel_type):
for rec in self:
picking = rec.filtered(lambda a: a.state == 'done')
for pick in picking:
for move in pick.move_ids_without_package:
# for move_line in move.move_line_nosuggest_ids:
move.quantity = 0
move.state = 'draft'
move.unlink()
for move in pick.move_ids_without_package:
move.state = 'draft'
move.is_locked = False
if stock_picking_cancel_type == 'cancel':
rec._action_cancel()
elif stock_picking_cancel_type == 'cancel_reset':
rec._action_draft()
elif stock_picking_cancel_type == 'cancel_delete':
rec.unlink()
def action_cancel(self):
stock_picking_cancel_type = self.env['ir.config_parameter'].sudo().get_param('cancellation_feature_cr'
'.stock_picking_cancel_type')
self.action_for_all_operations(stock_picking_cancel_type)
if stock_picking_cancel_type == 'cancel_delete':
action = self.env["ir.actions.act_window"]._for_xml_id('stock.action_picking_tree_ready')
return action
res = super(Picking, self).action_cancel()
return res
# SERVER ACTIONS METHODS
def stock_picking_cancel_server_action_method(self):
stock_picking_cancel_type = 'cancel'
self.action_for_all_operations(stock_picking_cancel_type)
def stock_picking_cancel_draft_server_action_method(self):
stock_picking_cancel_type = 'cancel_reset'
self.action_for_all_operations(stock_picking_cancel_type)
def stock_picking_cancel_delete_server_action_method(self):
stock_picking_cancel_type = 'cancel_delete'
self.action_for_all_operations(stock_picking_cancel_type)
action = self.env["ir.actions.act_window"]._for_xml_id('stock.action_picking_tree_ready')
return action

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<data>
<record model="ir.module.category" id="module_cancellation_category">
<field name="name">Cancellation Groups</field>
<field name="sequence">100</field>
</record>
<record id="group_cancellation_sale_orders" model="res.groups">
<field name="name">Cancel Sale Orders</field>
<field name="category_id" ref="cancellation_feature_cr.module_cancellation_category"/>
</record>
<record id="group_cancellation_purchase_orders" model="res.groups">
<field name="name">Cancel Purchase Orders</field>
<field name="category_id" ref="cancellation_feature_cr.module_cancellation_category"/>
</record>
<record id="group_cancellation_inventory_orders" model="res.groups">
<field name="name">Cancel Inventory Orders</field>
<field name="category_id" ref="cancellation_feature_cr.module_cancellation_category"/>
</record>
<record id="group_cancellation_invoice_orders" model="res.groups">
<field name="name">Cancel Invoice Orders</field>
<field name="category_id" ref="cancellation_feature_cr.module_cancellation_category"/>
</record>
</data>
</odoo>

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 127 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 189 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 245 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 322 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 115 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 431 B

View File

@ -0,0 +1,589 @@
<div class="row justify-content-md-between justify-content-center border-bottom align-items-center py-2 mx-0">
<div class="text-center mr-5">
<a href="https://candidroot.com/">
<img src="images/icon.png" alt="candidroot-logo">
</a>
</div>
<div class="mt-md-0 mt-4 mb-3 mb-lg-0">
<span class="btn btn-sm mb-2 mb-lg-0"
style="font-size:14px; font-weight:500; background-color:#203038; color:#fff"><i class="fa fa-check"></i> Community</span>
<span class="btn btn-sm mb-2 mb-lg-0"
style="font-size:14px; font-weight:500; background-color:#203038; color:#fff"><i class="fa fa-check"></i> Enterprise</span>
</div>
</div>
<section class="container">
<div class="row">
<div class="col-md-12">
<h2 class="oe_slogan" style=" font-size: 30px; color: #1495c9">
Cancellation Order Feature
</h2>
</div>
<div class="row mt16 mb16 py-2 m-1"
style="font-weight:500; font-size:18px; color:#484848; width:90%; font-family:'Montserrat', sans-serif">
<div class="container col-md-6 border-right"
style="font-weight:500; line-height:24px; font-size:16px; color:#484848; font-family:'Montserrat', sans-serif; vertical-align:middle; display:grid">
<p class="mb4 mt4 mr8">
Enable <b style="color:red">cancellation</b> functionality for <b style="color:red">Sales Order</b>, <b style="color:red">Purchase Order</b>, <b style="color:red">Inventory</b>, and <b style="color:red">Invoice</b> using this
module.
</p>
</div>
<div class="container col-md-6 ">
<h4 class="ml-md-3">Youtube Video</h4>
<div class="mt-2 ml-md-3" style="display:flex;margin-top:0.5rem;">
<span class="ml-1 mr-2 my-auto">
<img src="images/youtube2.png" alt="user-guide"></span>
<a href="https://youtu.be/Ibq81e7GRSQ">
<span style="font-size:15px; margin-top:0.2rem;margin-left:0.5rem;">Cancellation Order Feature</span>
</a>
</div>
</div>
</div>
</div>
</section>
<section class="container">
<div class="d-flex m-0">
<h3 style="font-size:2rem !important; font-weight:800 !important; color:#ffffff !important; background-color:#0492cf !important; padding:1rem !important; width:70px !important; height:70px !important">
01</h3>
<div class="d-flex flex-column bd-highlight mb-3">
<div class="p-2 bd-highlight">
<h3 class="oe_slogan"
style="text-align:left; font-size:19px; width:100%; margin-top:4px; margin-left:8px;color:#000 !important; opacity:1 !important; line-height:20px; font-weight:400; letter-spacing:.5px; margin-bottom:0px">
<b>Access the <b style="color:red">sales order</b>, then click on any <b style="color:red">specific order</b> within it.</b>
</h3>
</div>
</div>
</div>
<div class="mt16">
<img class="img img-responsive oe_screenshot"
style="width:100%; margin-top:-15px !important; border-top:5px solid #00438B !important; margin-bottom:4rem !important"
src="sale_config.png"/>
</div>
</section>
<section class="container">
<div class="d-flex m-0">
<h3 style="font-size:2rem !important; font-weight:800 !important; color:#ffffff !important; background-color:#0492cf !important; padding:1rem !important; width:70px !important; height:70px !important">
02</h3>
<div class="d-flex flex-column bd-highlight mb-3">
<div class="p-2 bd-highlight">
<h3 class="oe_slogan"
style="text-align:left; font-size:19px; width:100%; margin-top:4px; margin-left:8px;color:#000 !important; opacity:1 !important; line-height:20px; font-weight:400; letter-spacing:.5px; margin-bottom:0px">
<b>Access cancellation groups.</b>
</h3>
</div>
</div>
</div>
<div class="mt16">
<img class="img img-responsive oe_screenshot"
style="width:100%; margin-top:-15px !important; border-top:5px solid #00438B !important; margin-bottom:4rem !important"
src="sale_order_img.png"/>
</div>
</section>
<section class="container">
<div class="d-flex m-0">
<h3 style="font-size:2rem !important; font-weight:800 !important; color:#ffffff !important; background-color:#0492cf !important; padding:1rem !important; width:70px !important; height:70px !important">
03</h3>
<div class="d-flex flex-column bd-highlight mb-3">
<div class="p-2 bd-highlight">
<h3 class="oe_slogan"
style="text-align:left; font-size:17px; width:100%; margin-top:4px; margin-left:8px;color:#000 !important; opacity:1 !important; line-height:20px; font-weight:400; letter-spacing:.5px; margin-bottom:0px">
<b>If the "<b style="color:red">Cancel delivery order, Cancel Invoice & Payment</b>" option is selected in the sale order
settings, canceling the sale order will also cancel the associated invoice, payment, and
delivery order.</b>
</h3>
</div>
</div>
</div>
<div class="mt16">
<img class="img img-responsive oe_screenshot"
style="width:100%; margin-top:-15px !important; border-top:5px solid #00438B !important; margin-bottom:4rem !important"
src="so_configuration.png"/>
</div>
</section>
<section class="container">
<div class="d-flex m-0">
<h3 style="font-size:2rem !important; font-weight:800 !important; color:#ffffff !important; background-color:#0492cf !important; padding:1rem !important; width:70px !important; height:70px !important">
04</h3>
<div class="d-flex flex-column bd-highlight mb-3">
<div class="p-2 bd-highlight">
<h3 class="oe_slogan"
style="text-align:left; font-size:19px; width:100%; margin-top:4px; margin-left:8px;color:#000 !important; opacity:1 !important; line-height:20px; font-weight:400; letter-spacing:.5px; margin-bottom:0px">
<b>Click the sale order <b style="color:red">Cancel button</b> to initiate the cancellation of the respective <b style="color:red">sales
order</b>.</b>
</h3>
</div>
</div>
</div>
<div class="mt16">
<img class="img img-responsive oe_screenshot"
style="width:100%; margin-top:-15px !important; border-top:5px solid #00438B !important; margin-bottom:4rem !important"
src="click_cancel_so.png"/>
</div>
</section>
<section class="container">
<div class="d-flex m-0">
<h3 style="font-size:2rem !important; font-weight:800 !important; color:#ffffff !important; background-color:#0492cf !important; padding:1rem !important; width:70px !important; height:70px !important">
05</h3>
<div class="d-flex flex-column bd-highlight mb-3">
<div class="p-2 bd-highlight">
<h3 class="oe_slogan"
style="text-align:left; font-size:19px; width:100%; margin-top:4px; margin-left:8px;color:#000 !important; opacity:1 !important; line-height:20px; font-weight:400; letter-spacing:.5px; margin-bottom:0px">
<b>Upon clicking the sale order <b style="color:red">cancel button</b>, the <b style="color:red">sale order</b>, <b style="color:red">invoice</b>, and <b style="color:red">payment</b> in that state
will be <b style="color:red">canceled</b>.</b>
</h3>
</div>
</div>
</div>
<div class="mt16">
<img class="img img-responsive oe_screenshot"
style="width:100%; margin-top:-15px !important; border-top:5px solid #00438B !important; margin-bottom:4rem !important"
src="after_cancelling_so.png"/>
</div>
<div class="mt16">
<img class="img img-responsive oe_screenshot"
style="width:100%; margin-top:-15px !important; border-top:5px solid #00438B !important; margin-bottom:4rem !important"
src="delivery_cancel.png"/>
</div>
<div class="mt16">
<img class="img img-responsive oe_screenshot"
style="width:100%; margin-top:-15px !important; border-top:5px solid #00438B !important; margin-bottom:4rem !important"
src="invoice_cancellation.png"/>
</div>
<div class="mt16">
<img class="img img-responsive oe_screenshot"
style="width:100%; margin-top:-15px !important; border-top:5px solid #00438B !important; margin-bottom:4rem !important"
src="payment_cancellation.png"/>
</div>
</section>
<section class="container">
<div class="d-flex m-0">
<h3 style="font-size:2rem !important; font-weight:800 !important; color:#ffffff !important; background-color:#0492cf !important; padding:1rem !important; width:70px !important; height:70px !important">
06</h3>
<div class="d-flex flex-column bd-highlight mb-3">
<div class="p-2 bd-highlight">
<h3 class="oe_slogan"
style="text-align:left; font-size:19px; width:100%; margin-top:4px; margin-left:8px;color:#000 !important; opacity:1 !important; line-height:20px; font-weight:400; letter-spacing:.5px; margin-bottom:0px">
<b>Click on "<b style="color:red">Sale Order Cancel & Draft</b>" to initiate the cancellation and return the sale order to
<b style="color:red">draft status</b>.</b>
</h3>
</div>
</div>
</div>
<div class="mt16">
<img class="img img-responsive oe_screenshot"
style="width:100%; margin-top:-15px !important; border-top:5px solid #00438B !important; margin-bottom:4rem !important"
src="click_cancel&_draft.png"/>
</div>
</section>
<section class="container">
<div class="d-flex m-0">
<h3 style="font-size:2rem !important; font-weight:800 !important; color:#ffffff !important; background-color:#0492cf !important; padding:1rem !important; width:70px !important; height:70px !important">
07</h3>
<div class="d-flex flex-column bd-highlight mb-3">
<div class="p-2 bd-highlight">
<h3 class="oe_slogan"
style="text-align:left; font-size:17px; width:100%; margin-top:4px; margin-left:8px;color:#000 !important; opacity:1 !important; line-height:20px; font-weight:400; letter-spacing:.5px; margin-bottom:0px">
<b>Clicking "<b style="color:red">Sale Order Cancel & Draft</b>" transitions a canceled sale order to the draft state; if the order is not canceled, the usual cancellation process occurs.</b>
</h3>
</div>
</div>
</div>
<div class="mt16">
<img class="img img-responsive oe_screenshot"
style="width:100%; margin-top:-15px !important; border-top:5px solid #00438B !important; margin-bottom:4rem !important"
src="quotation_state_so.png"/>
</div>
</section>
<section class="container">
<div class="d-flex m-0">
<h3 style="font-size:2rem !important; font-weight:800 !important; color:#ffffff !important; background-color:#0492cf !important; padding:1rem !important; width:70px !important; height:70px !important">
08</h3>
<div class="d-flex flex-column bd-highlight mb-3">
<div class="p-2 bd-highlight">
<h3 class="oe_slogan"
style="text-align:left; font-size:17px; width:100%; margin-top:4px; margin-left:8px;color:#000 !important; opacity:1 !important; line-height:20px; font-weight:400; letter-spacing:.5px; margin-bottom:0px">
<b>Clicking "<b style="color:red">Sale Order Cancel & Delete</b>" deletes an already canceled sale order; if not canceled,
the regular cancellation process is initiated.</b>
</h3>
</div>
</div>
</div>
<div class="mt16">
<img class="img img-responsive oe_screenshot"
style="width:100%; margin-top:-15px !important; border-top:5px solid #00438B !important; margin-bottom:4rem !important"
src="click_cancel&_delete.png"/>
</div>
</section>
<section class="container">
<div class="d-flex m-0">
<h3 style="font-size:2rem !important; font-weight:800 !important; color:#ffffff !important; background-color:#0492cf !important; padding:1rem !important; width:70px !important; height:70px !important">
09</h3>
<div class="d-flex flex-column bd-highlight mb-3">
<div class="p-2 bd-highlight">
<h3 class="oe_slogan"
style="text-align:left; font-size:16px; width:100%; margin-top:4px; margin-left:8px;color:#000 !important; opacity:1 !important; line-height:20px; font-weight:400; letter-spacing:.5px; margin-bottom:0px">
<b>If the "<b style="color:red">Cancel Receipt Order & Cancel Bill</b>" option is selected in the purchase order settings,
canceling the purchase order will also cancel the associated bill, payment, and receipt
order.</b>
</h3>
</div>
</div>
</div>
<div class="mt16">
<img class="img img-responsive oe_screenshot"
style="width:100%; margin-top:-15px !important; border-top:5px solid #00438B !important; margin-bottom:4rem !important"
src="po_configuration.png"/>
</div>
</section>
<section class="container">
<div class="d-flex m-0">
<h3 style="font-size:2rem !important; font-weight:800 !important; color:#ffffff !important; background-color:#0492cf !important; padding:1rem !important; width:70px !important; height:70px !important">
10</h3>
<div class="d-flex flex-column bd-highlight mb-3">
<div class="p-2 bd-highlight">
<h3 class="oe_slogan"
style="text-align:left; font-size:17px; width:100%; margin-top:4px; margin-left:8px;color:#000 !important; opacity:1 !important; line-height:20px; font-weight:400; letter-spacing:.5px; margin-bottom:0px">
<b> Click the <b style="color:red">Purchase Order Cancel button</b> to initiate the cancellation of the respective purchase
order.</b>
</h3>
</div>
</div>
</div>
<div class="mt16">
<img class="img img-responsive oe_screenshot"
style="width:100%; margin-top:-15px !important; border-top:5px solid #00438B !important; margin-bottom:4rem !important"
src="click_po_cancel.png"/>
</div>
</section>
<section class="container">
<div class="d-flex m-0">
<h3 style="font-size:2rem !important; font-weight:800 !important; color:#ffffff !important; background-color:#0492cf !important; padding:1rem !important; width:70px !important; height:70px !important">
11</h3>
<div class="d-flex flex-column bd-highlight mb-3">
<div class="p-2 bd-highlight">
<h3 class="oe_slogan"
style="text-align:left; font-size:19px; width:100%; margin-top:4px; margin-left:8px;color:#000 !important; opacity:1 !important; line-height:20px; font-weight:400; letter-spacing:.5px; margin-bottom:0px">
<b>After clicking the purchase order cancel button, the <b style="color:red">purchase order</b>, <b style="color:red">bill</b>, <b style="color:red">receipt</b>, and <b style="color:red">payment</b>
in that state will be <b style="color:red">canceled</b>.</b>
</h3>
</div>
</div>
</div>
<div class="mt16">
<img class="img img-responsive oe_screenshot"
style="width:100%; margin-top:-15px !important; border-top:5px solid #00438B !important; margin-bottom:4rem !important"
src="cancelled_po_image.png"/>
</div>
<div class="mt16">
<img class="img img-responsive oe_screenshot"
style="width:100%; margin-top:-15px !important; border-top:5px solid #00438B !important; margin-bottom:4rem !important"
src="po_bill_cancel.png"/>
</div>
<div class="mt16">
<img class="img img-responsive oe_screenshot"
style="width:100%; margin-top:-15px !important; border-top:5px solid #00438B !important; margin-bottom:4rem !important"
src="po_transfer_cancel.png"/>
</div>
<div class="mt16">
<img class="img img-responsive oe_screenshot"
style="width:100%; margin-top:-15px !important; border-top:5px solid #00438B !important; margin-bottom:4rem !important"
src="po_payment_cancel.png"/>
</div>
</section>
<section class="container">
<div class="d-flex m-0">
<h3 style="font-size:2rem !important; font-weight:800 !important; color:#ffffff !important; background-color:#0492cf !important; padding:1rem !important; width:70px !important; height:70px !important">
12</h3>
<div class="d-flex flex-column bd-highlight mb-3">
<div class="p-2 bd-highlight">
<h3 class="oe_slogan"
style="text-align:left; font-size:17px; width:100%; margin-top:4px; margin-left:8px;color:#000 !important; opacity:1 !important; line-height:20px; font-weight:400; letter-spacing:.5px; margin-bottom:0px">
<b>Click on "<b style="color:red">Purchase Order Cancel & Draft</b>" to cancel the purchase order and return it to <b style="color:red">draft</b>
status.</b>
</h3>
</div>
</div>
</div>
<div class="mt16">
<img class="img img-responsive oe_screenshot"
style="width:100%; margin-top:-15px !important; border-top:5px solid #00438B !important; margin-bottom:4rem !important"
src="po_click_cancel&_draft.png"/>
</div>
</section>
<section class="container">
<div class="d-flex m-0">
<h3 style="font-size:2rem !important; font-weight:800 !important; color:#ffffff !important; background-color:#0492cf !important; padding:1rem !important; width:70px !important; height:70px !important">
13</h3>
<div class="d-flex flex-column bd-highlight mb-3">
<div class="p-2 bd-highlight">
<h3 class="oe_slogan"
style="text-align:left; font-size:16px; width:100%; margin-top:4px; margin-left:8px;color:#000 !important; opacity:1 !important; line-height:20px; font-weight:400; letter-spacing:.5px; margin-bottom:0px">
<b>Clicking "<b style="color:red">Purchase Order Cancel & Draft</b>" transitions a canceled purchase order to a draft state;
if not canceled, the regular cancellation process occurs.</b>
</h3>
</div>
</div>
</div>
<div class="mt16">
<img class="img img-responsive oe_screenshot"
style="width:100%; margin-top:-15px !important; border-top:5px solid #00438B !important; margin-bottom:4rem !important"
src="rfq_state_po.png"/>
</div>
</section>
<section class="container">
<div class="d-flex m-0">
<h3 style="font-size:2rem !important; font-weight:800 !important; color:#ffffff !important; background-color:#0492cf !important; padding:1rem !important; width:70px !important; height:70px !important">
14</h3>
<div class="d-flex flex-column bd-highlight mb-3">
<div class="p-2 bd-highlight">
<h3 class="oe_slogan"
style="text-align:left; font-size:16px; width:100%; margin-top:4px; margin-left:8px;color:#000 !important; opacity:1 !important; line-height:20px; font-weight:400; letter-spacing:.5px; margin-bottom:0px">
<b>Clicking "<b style="color:red">Purchase Order Cancel & Delete</b>" deletes an already canceled purchase order; if not
canceled, the regular cancellation process is initiated.</b>
</h3>
</div>
</div>
</div>
<div class="mt16">
<img class="img img-responsive oe_screenshot"
style="width:100%; margin-top:-15px !important; border-top:5px solid #00438B !important; margin-bottom:4rem !important"
src="po_click_cancel_&delete.png"/>
</div>
</section>
<section class="oe_container oe_dark">
<div class="oe_mt16 oe_mb16">
<h2 class="oe_slogan">Get Help From Us!</h2>
</div>
<div class="oe_slogan">
<a class="btn btn-primary btn-md mt8" style="color: #FFFFFF !important;" href="mailto:info@candidroot.com"
target="_blank">
<i class="fa fa-envelope"></i>
Email
</a>
<a class="btn btn-primary btn-md mt8" style="color: #FFFFFF !important;"
href="https://www.candidroot.com/contactus" target="_blank">
<i class="fa fa-phone"></i>
Need Our Service ?
</a>
<a class="btn btn-primary btn-md mt8" style="color: #FFFFFF !important;"
href="https://apps.odoo.com/apps/modules/browse?search=candidroot" target="_blank">
<i class="fa fa-suitcase"></i>
Our Products
</a>
</div>
</section>
<div class="row pb-sm-5 px-1 pb-4">
<h2 class="oe_slogan w-100">Our Services</h2>
<div class="col-12 col-sm-6 col-md-4" style="margin-bottom: 20px;">
<div class="card" style="box-shadow: -1px 1px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07); border-radius: 10px; border: none; min-height: 145px;">
<div style="padding: 1.25rem;" class="text-center">
<img src="images/Implementation.png" alt="support" style="width: 100%;">
</div>
<div class="card-body text-center">
<h5 class="card-title" style="font-size: 19px;">
<a href="https://www.candidroot.com/odoo-implementation" name="Odoo Implementation"
title="Odoo Implementation Services">
Odoo Implementation
</a>
</h5>
</div>
</div>
</div>
<div class="col-12 col-sm-6 col-md-4" style="margin-bottom: 20px;">
<div class="card" style="box-shadow: -1px 1px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07); border-radius: 10px; border: none; min-height: 145px;">
<div style="padding: 1.25rem;" class="text-center">
<img src="images/Customization.png" alt="apps" style="width: 100%;">
</div>
<div class="card-body text-center">
<h5 class="card-title" style="font-size: 19px;">
<a href="https://www.candidroot.com/odoo-customization" name="Odoo Customization"
title="Odoo Customization Services">
Odoo Customization
</a>
</h5>
</div>
</div>
</div>
<div class="col-12 col-sm-6 col-md-4" style="margin-bottom: 20px;">
<div class="card" style="box-shadow: -1px 1px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07); border-radius: 10px; border: none; min-height: 145px;">
<div style="padding: 1.25rem;" class="text-center">
<img src="images/Development.png" alt="support" style="width: 100%;">
</div>
<div class="card-body text-center">
<h5 class="card-title" style="font-size: 19px;">
<a href="https://www.candidroot.com/odoo-development" name="Odoo Development"
title="Odoo Development Services">
Odoo Development
</a>
</h5>
</div>
</div>
</div>
<div class="col-12 col-sm-6 col-md-4" style="margin-bottom: 20px;">
<div class="card" style="box-shadow: -1px 1px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07); border-radius: 10px; border: none; min-height: 145px;">
<div style="padding: 1.25rem;" class="text-center">
<img src="images/migration.png" alt="apps" style="width: 100%;">
</div>
<div class="card-body text-center">
<h5 class="card-title" style="font-size: 19px;">
<a href="https://www.candidroot.com/odoo-migration" name="Odoo Migration"
title="Odoo Migration Services">
Odoo Migration
</a>
</h5>
</div>
</div>
</div>
<div class="col-12 col-sm-6 col-md-4" style="margin-bottom: 20px;">
<div class="card"
style="box-shadow: -1px 1px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07); border-radius: 10px; border: none; min-height: 145px;">
<div style="padding: 1.25rem;" class="text-center">
<img src="images/Integration.png" alt="support" style="width: 100%;">
</div>
<div class="card-body text-center">
<h5 class="card-title" style="font-size: 19px;">
<a href="https://www.candidroot.com/odoo-integration" name="Odoo Integration"
title="Odoo Integration Services">
Odoo Integration
</a>
</h5>
</div>
</div>
</div>
<div class="col-12 col-sm-6 col-md-4" style="margin-bottom: 20px;">
<div class="card"
style="box-shadow: -1px 1px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07); border-radius: 10px; border: none; min-height: 145px;">
<div style="padding: 1.25rem;" class="text-center">
<img src="images/Consulting.png" alt="apps" style="width: 100%;">
</div>
<div class="card-body text-center">
<h5 class="card-title" style="font-size: 19px;">
<a href="https://www.candidroot.com/odoo-consulting" name="Odoo Consulting"
title="Odoo Consulting Services">
Odoo Consulting
</a>
</h5>
</div>
</div>
</div>
<div class="col-12 col-sm-6 col-md-4" style="margin-bottom: 20px;">
<div class="card"
style="box-shadow: -1px 1px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07); border-radius: 10px; border: none; min-height: 145px;">
<div style="padding: 1.25rem;" class="text-center">
<img src="images/Odoo Support.png" alt="support" style="width: 100%;">
</div>
<div class="card-body text-center">
<h5 class="card-title" style="font-size: 19px;">
<a href="https://www.candidroot.com/odoo-support" name="Odoo Support" title="Odoo Support Services">
Odoo Support
</a>
</h5>
</div>
</div>
</div>
<div class="col-12 col-sm-6 col-md-4" style="margin-bottom: 20px;">
<div class="card"
style="box-shadow: -1px 1px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07); border-radius: 10px; border: none; min-height: 145px;">
<div style="padding: 1.25rem;" class="text-center">
<img src="images/Odoo Theme Development.png" alt="apps" style="width: 100%;">
</div>
<div class="card-body text-center">
<h5 class="card-title" style="font-size: 19px;">
<a href="https://www.candidroot.com/odoo-theme" name="Odoo Theme Development" title="Odoo Theme Development Services">
Odoo Theme Development
</a>
</h5>
</div>
</div>
</div>
<div class="col-12 col-sm-6 col-md-4" style="margin-bottom: 20px;">
<div class="card"
style="box-shadow: -1px 1px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07); border-radius: 10px; border: none; min-height: 145px;">
<div style="padding: 1.25rem;" class="text-center">
<img src="images/CMS.png" alt="support" style="width: 100%;">
</div>
<div class="card-body text-center">
<h5 class="card-title" style="font-size: 19px;">
<a href="https://www.candidroot.com/odoo-cms" name="Odoo CMS Development" title="Odoo CMS Development">
Odoo CMS Development
</a>
</h5>
</div>
</div>
</div>
<div class="col-12 col-sm-6 col-md-4" style="margin-bottom: 20px;">
<div class="card"
style="box-shadow: -1px 1px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07); border-radius: 10px; border: none; min-height: 145px;">
<div style="padding: 1.25rem;" class="text-center">
<img src="images/E-Commerce.png" alt="apps" style="width: 100%;">
</div>
<div class="card-body text-center">
<h5 class="card-title" style="font-size: 19px;">
<a href="https://www.candidroot.com/odoo-ecommerce" name="Odoo Ecommerce Development" title="Odoo CMS Development">
Odoo Ecommerce Development
</a>
</h5>
</div>
</div>
</div>
<div class="col-12 col-sm-6 col-md-4" style="margin-bottom: 20px;">
<div class="card"
style="box-shadow: -1px 1px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07); border-radius: 10px; border: none; min-height: 145px;">
<div style="padding: 1.25rem;" class="text-center">
<img src="images/Mobile Application.png" alt="support" style="width: 100%;">
</div>
<div class="card-body text-center">
<h5 class="card-title" style="font-size: 19px;">
<a href="https://www.candidroot.com/odoo-mobile-application" name="Odoo Mobile App" title="Odoo Mobile App">
Odoo Mobile App
</a>
</h5>
</div>
</div>
</div>
<div class="col-12 col-sm-6 col-md-4" style="margin-bottom: 20px;">
<div class="card"
style="box-shadow: -1px 1px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07); border-radius: 10px; border: none; min-height: 145px;">
<div style="padding: 1.25rem;" class="text-center">
<img src="images/Odoo Training.png" alt="apps" style="width: 100%;">
</div>
<div class="card-body text-center">
<h5 class="card-title" style="font-size: 19px;">
<a href="https://www.candidroot.com/odoo-training" name="Odoo Training" title="Odoo Training">
Odoo Training
</a>
</h5>
</div>
</div>
</div>
</div>
<section class="container oe_dark">
<h2 class="oe_slogan">Please Follow Us On</h2>
<div class="oe_slogan">
<a class="btn btn-primary" href="https://www.facebook.com/candidrootodoo" target="_blank"
style="background-color: #3B5998;">
<span class="fa fa-facebook"></span>
</a>
<a class="btn btn-primary" style="background-color: #55ACEE;" href="https://twitter.com/candidroot"
target="_blank">
<span class="fa fa-twitter"></span>
</a>
<a class="btn btn-primary" style="background-color: #007BB6;"
href="https://www.linkedin.com/in/candidroot-solutions-968560166" target="_blank">
<span class="fa fa-linkedin"></span>
</a>
<a class="btn btn-primary" style="background-color: #cd201f;"
href="https://www.youtube.com/channel/UCBJPsoeB2TT_6h9dYNqsZ5A" target="_blank">
<span class="fa fa-youtube"></span>
</a>
<a class="btn btn-primary" style="background-color: #444444;" href="https://github.com/candidroot"
target="_blank">
<span class="fa fa-github"></span>
</a>
</div>
</section>

Binary file not shown.

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB

View File

@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_inventory_res_config_settings" model="ir.ui.view">
<field name="name">view.inventory.res.config.settings</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="stock.res_config_settings_view_form"/>
<field name="arch" type="xml">
<xpath expr="//block[@name='warehouse_setting_container']" position="after">
<h2 groups="cancellation_feature_cr.group_cancellation_inventory_orders">Stock Picking Operations Type</h2>
<div class="row mt16 o_settings_container" id="inventory_cancel_other_setting_container" groups="cancellation_feature_cr.group_cancellation_inventory_orders">
<div class="col-12 col-lg-6 o_setting_box" id="cancel_stock_picking_option"
title="Cancel Stock picking with different ways" >
<div class="o_setting_right_pane">
<label for="stock_picking_cancel_type"/>
<div class="text-muted">
These 3 cancellation option are related with ( Cancel Picking ) Button.
this options will affect only the 'Done' state of receipt/delivery order/picking.
If you are going to cancel from action menu ,In that case Cancellation process will work based on your selected choice of action menu.
</div>
<div class="content-group">
<div class="mt16">
<field name="stock_picking_cancel_type" class="o_light_label" widget="radio"/>
</div>
</div>
</div>
</div>
</div>
</xpath>
</field>
</record>
</odoo>

View File

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_invoice_res_config_settings" model="ir.ui.view">
<field name="name">view.invoice.res.config.settings</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="account.res_config_settings_view_form"/>
<field name="arch" type="xml">
<xpath expr="//block[@id='pay_invoice_online_setting_container']" position="after">
<h2 groups="cancellation_feature_cr.group_cancellation_invoice_orders">Invoice Cancel Configuration</h2>
<div class="row mt16 o_settings_container" id="invoice_cancel_other_setting_container"
groups="cancellation_feature_cr.group_cancellation_invoice_orders">
<div class="col-12 col-lg-6 o_setting_box" id="cancel_invoice_picking_option"
title="Cancel Invoices with different ways">
<div class="o_setting_left_pane">
</div>
<div class="o_setting_right_pane">
<label for="invoice_cancel_type"/>
<div class="text-muted">
These 3 cancellation option are related with ( Cancel Invoice ) Button.
this options will affect only the 'POSTED' state of invoice.
If you are going to cancel from action menu ,In that case Cancellation process will work
based on your selected choice of action menu.
</div>
<div class="content-group">
<div class="mt16">
<field name="invoice_cancel_type" class="o_light_label" widget="radio"/>
</div>
</div>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box" id="show_purchase_receipts">
<div class="o_setting_left_pane">
</div>
<div class="o_setting_right_pane">
<label for="payment_cancel_type"/>
<div class="text-muted">
These 3 cancellation option are related with ( Cancel Payment ) Button.
this options will affect only the 'POSTED' state of payment.
If you are going to cancel from action menu ,In that case Cancellation process will work
based on your selected choice of action menu.
</div>
<div class="content-group">
<div class="mt16">
<field name="payment_cancel_type" class="o_light_label" widget="radio"/>
</div>
</div>
</div>
</div>
</div>
</xpath>
</field>
</record>
</odoo>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="account_move_inherit_form2" model="ir.ui.view">
<field name="name">account.move.inherit.form</field>
<field name="model">account.move</field>
<field name="inherit_id" ref="account.view_move_form"/>
<field name="arch" type="xml">
<xpath expr="//header/button[@name='button_cancel'][2]" position="replace">
<button name="button_cancel" string="Cancel" type="object" groups="account.group_account_invoice"
data-hotkey="w" invisible=" state == 'cancel' "/>
</xpath>
</field>
</record>
<record id="account_payment_inherit_form" model="ir.ui.view">
<field name="name">account.payment.inherit.form</field>
<field name="model">account.payment</field>
<field name="inherit_id" ref="account.view_account_payment_form"/>
<field name="arch" type="xml">
<xpath expr="//button[@name='action_cancel']" position="replace">
<button name="action_cancel" string="Cancel" type="object" invisible=" state in ('cancel') "
data-hotkey="z"/>
</xpath>
</field>
</record>
</odoo>

View File

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_po_res_config_settings" model="ir.ui.view">
<field name="name">view.po.res.config.settings</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="purchase.res_config_settings_view_form_purchase"/>
<field name="arch" type="xml">
<xpath expr="//block[@name='matrix_setting_container']" position="after">
<h2 groups="cancellation_feature_cr.group_cancellation_purchase_orders">Purchase Order Cancel Configuration</h2>
<div class="row mt16 o_settings_container" id="so_cancel_setting_container" groups="cancellation_feature_cr.group_cancellation_purchase_orders">
<div class="col-12 col-lg-6 o_setting_box" id="cancel_purchase_order_option"
title="Cancel Purchase order with different ways">
<div class="o_setting_right_pane">
<label for="po_cancel_type"/>
<div class="text-muted">
If you cancel a purchase order from button then these 3 cancellation options are effected.
If you are going to cancel from action menu ,In that case Cancellation process will work based on your selected choice of action menu.
</div>
<div class="content-group">
<div class="mt16">
<field name="po_cancel_type" class="o_light_label" widget="radio"/>
</div>
</div>
</div>
</div>
</div>
<div class="row mt16 o_settings_container" id="so_cancel_other_setting_container" groups="cancellation_feature_cr.group_cancellation_purchase_orders">
<div class="col-12 col-lg-6 o_setting_box" id="so_cancel_do_setting_container">
<div class="o_setting_left_pane">
<field name="cancel_receipt_order"/>
</div>
<div class="o_setting_right_pane">
<label for="cancel_receipt_order"/>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box" id="so_cancel_invoice_setting_container">
<div class="o_setting_left_pane">
<field name="cancel_bill_payment"/>
</div>
<div class="o_setting_right_pane">
<label for="cancel_bill_payment"/>
</div>
</div>
</div>
</xpath>
</field>
</record>
</odoo>

View File

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="view_so_res_config_settings" model="ir.ui.view">
<field name="name">view.so.res.config.settings</field>
<field name="model">res.config.settings</field>
<field name="inherit_id" ref="sale.res_config_settings_view_form"/>
<field name="arch" type="xml">
<xpath expr="//block[@id='pricing_setting_container']" position="after">
<h2 groups="cancellation_feature_cr.group_cancellation_sale_orders">Sale Order Cancel Configuration</h2>
<div class="row mt16 o_settings_container" id="so_cancel_setting_container" groups="cancellation_feature_cr.group_cancellation_sale_orders">
<div class="col-12 col-lg-6 o_setting_box" id="cancel_sale_order_option"
title="Cancel Sale order with different ways">
<div class="o_setting_right_pane">
<label for="so_cancel_type"/>
<div class="text-muted">
If you cancel a sale order from button then these 3 cancellation options are effected.
If you are going to cancel from action menu ,In that case Cancellation process will work based on your selected choice of action menu.
</div>
<div class="content-group">
<div class="mt16">
<field name="so_cancel_type" class="o_light_label" widget="radio"/>
</div>
</div>
</div>
</div>
</div>
<div class="row mt16 o_settings_container" id="so_cancel_other_setting_container" groups="cancellation_feature_cr.group_cancellation_sale_orders">
<div class="col-12 col-lg-6 o_setting_box" id="so_cancel_do_setting_container">
<div class="o_setting_left_pane">
<field name="cancel_do"/>
</div>
<div class="o_setting_right_pane">
<label for="cancel_do"/>
</div>
</div>
<div class="col-12 col-lg-6 o_setting_box" id="so_cancel_invoice_setting_container">
<div class="o_setting_left_pane">
<field name="cancel_invoice_payment"/>
</div>
<div class="o_setting_right_pane">
<label for="cancel_invoice_payment"/>
</div>
</div>
</div>
</xpath>
</field>
</record>
</odoo>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<odoo>
<record id="stock_picking_inherit_form" model="ir.ui.view">
<field name="name">stock.picking.inherit.form</field>
<field name="model">stock.picking</field>
<field name="inherit_id" ref="stock.view_picking_form"/>
<field name="arch" type="xml">
<xpath expr="//button[@name='action_cancel']" position="replace">
<button name="action_cancel" invisible="state not in ('assigned', 'confirmed', 'draft', 'waiting','done')" string="Cancel" groups="base.group_user" type="object" data-hotkey="z"/>
</xpath>
</field>
</record>
</odoo>