This repository contains customizations and extensions for the Odoo ERP system. The customizations are aimed at enhancing the functionality of the Point of Sale (POS) module.
The project is organized as follows:
tst-test-odoo/
├──ttm_material/
│ ├── init.py
│ ├── manifest.py
│ ├── controllers/
│ │ └── material_controller.py
│ ├── models/
│ │ └── material.py
│ └── views/
│ └── material_views.xml
│
├── pos_customizations/
│ ├── __init__.py
│ ├── __manifest__.py
│ ├── static/
│ │ └── src/
│ │ └── js/
│ │ └── pos_customizations.js
│ └── views/
│ └── pos_customizations_templates.xml
└── README.md
The project is organized as follows:
-
ttm_material/: Module for managing materials.
- controllers/: Contains HTTP request handling.
- material_controller.py: Routes for CRUD operations on materials.
- models/: Definitions for data models.
- material.py: Defines the
material
model.
- material.py: Defines the
- views/: XML files defining views.
- material_views.xml: Views for the
material
model.
- material_views.xml: Views for the
- init.py: Module initialization.
- manifest.py: Metadata for the module.
- controllers/: Contains HTTP request handling.
-
pos_customizations/: Module for POS customizations.
- init.py: Module initialization.
- manifest.py: Metadata for the module.
- static/src/js/: JavaScript files for POS customization.
- pos_customizations.js: Custom JavaScript for POS behavior.
- views/: XML files for custom views and templates.
- pos_customizations_templates.xml: POS template customizations.
To install the modules, follow these steps:
-
Clone the repositories:
git clone https://github.com/teguhteja/tst-test-odoo.git
-
Navigate to the Odoo addons directory:
cd /path/to/your/odoo/addons
-
Update the module list:
odoo-bin -c your_odoo.conf -u ttm_material -u pos_customizations -d your_database
-
Install the modules:
- Go to the Odoo Apps menu.
- Search for
TTM Material
andPOS Customizations
. - Click
Install
for each module.
Manage materials through the Odoo interface or via API endpoints:
- List Materials:
GET /materials
- Create Material:
POST /materials/create
- Update Material:
POST /materials/update/<int:material_id>
- Delete Material:
POST /materials/delete/<int:material_id>
Customize POS behavior with updated numpad buttons:
- The "Price" and "Discount" buttons will be disabled.
- Numpad buttons show values like +10,000, +50,000, +100,000.
To use:
- Open the POS module in Odoo.
- Start a new session to see the updated numpad buttons.
Contributions are welcome! Follow these steps:
- Fork the repositories.
- Create a new branch:
git checkout -b feature/your-feature-name
- Make changes and commit.
- Push changes and create a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.