Skip to content

Commit

Permalink
Merge pull request #41 from kmee/14.0-add-sale_partial_lock
Browse files Browse the repository at this point in the history
[14.0][ADD] Addon: sale_partial_lock
  • Loading branch information
DiegoParadeda authored Sep 20, 2024
2 parents 3fd1c4e + c280e1c commit 7f18e06
Show file tree
Hide file tree
Showing 6 changed files with 76 additions and 0 deletions.
23 changes: 23 additions & 0 deletions sale_partial_lock/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
=================
Sale Partial Lock
=================

KMEE

Configuration
=============

To configure this module, you need to:

#. Go to ...

Usage
=====

To use this module, you need to:

#. Go to ...


Changelog
=========
Empty file added sale_partial_lock/__init__.py
Empty file.
17 changes: 17 additions & 0 deletions sale_partial_lock/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2024 KMEE
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Sale Partial Lock",
"version": "14.0.1.0.0",
"license": "AGPL-3",
"author": "KMEE",
"website": "https://github.com/KMEE/kmee-odoo-addons",
"depends": [
"sale",
],
"data": [
"views/sale_order.xml",
],
"demo": [],
}
29 changes: 29 additions & 0 deletions sale_partial_lock/views/sale_order.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright 2024 KMEE
License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). -->
<odoo>

<record model="ir.ui.view" id="sale_order_line_form_view">
<field name="name">sale.order.form (in sale_partial_lock)</field>
<field name="model">sale.order</field>
<field name="inherit_id" ref="sale.view_order_form" />
<field name="arch" type="xml">
<xpath expr="//form//header//button[@name='action_draft']" position="after">
<button
name="action_cancel"
type="object"
string="Cancel"
states="done"
/>
</xpath>
<xpath expr='//button[@name="payment_action_void"]' position="after">
<button
name="%(sale.action_view_sale_advance_payment_inv)d"
string="Create Invoice"
type="action"
attrs="{'invisible': [('invoice_status', '!=', 'to invoice'), ('state', '!=', 'done')]}"
/>
</xpath>
</field>
</record>
</odoo>
1 change: 1 addition & 0 deletions setup/sale_partial_lock/odoo/addons/sale_partial_lock
6 changes: 6 additions & 0 deletions setup/sale_partial_lock/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import setuptools

setuptools.setup(
setup_requires=['setuptools-odoo'],
odoo_addon=True,
)

0 comments on commit 7f18e06

Please sign in to comment.