Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
154 changes: 154 additions & 0 deletions lims_account/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
=======================================================
Laboratory Information Management System (LIMS) Account
=======================================================

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:ba316928464662c1a5ea05c80f1da795b848da8896e05e3f1384cb2e6ccb4f28
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

.. |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%2Fconnector--lims-lightgray.png?logo=github
:target: https://github.com/OCA/connector-lims/tree/18.0/lims_account
:alt: OCA/connector-lims
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/connector-lims-18-0/connector-lims-18-0-lims_account
: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/connector-lims&target_branch=18.0
:alt: Try me on Runboat

|badge1| |badge2| |badge3| |badge4| |badge5|

The **lims_account** module provides a bridge between the **LIMS
(Laboratory Information Management System)** and **Odoo Accounting**.

It introduces a bi-directional link between **LIMS Orders** and
**Invoices**, enabling users to:

- Associate one or multiple invoices (``account.move``) with one or
multiple LIMS orders (``lims.order``).
- Quickly navigate between LIMS Orders and their corresponding Invoices
using smart buttons.
- View related records directly in each form without leaving the current
screen.

**Table of contents**

.. contents::
:local:

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

Before installing this module:

1. Ensure both **account** and **lims** modules are installed and
working.
2. The user must have access rights to both Accounting and LIMS modules.

Usage
=====

From an Invoice (Customer/Vendor Bill)
======================================

1. Go to **Accounting → Customers → Invoices** (or Vendor Bills).
2. Open any invoice record.
3. In the **LIMS Integration** section, click **Add a line** in the
*LIMS Orders* field.
4. Select one or more **LIMS Orders** from the list.
5. Save the record.

| ✅ The invoice is now linked to those LIMS Orders.
| A **“LIMS Orders”** smart button appears in the header showing the
total count of linked orders.

--------------

From a LIMS Order
=================

1. Go to **LIMS → Orders**.
2. Open any LIMS Order record.
3. Use the **Invoices** smart button in the header.
4. Add or view linked invoices in the *Account Moves* field.

✅ The LIMS Order will now show all related invoices.

--------------

👁️ Viewing Linked Records
=========================

- On an **Invoice**, click the **LIMS Orders** smart button to open all
linked LIMS Orders.
- On a **LIMS Order**, click the **Invoices** smart button to open all
linked invoices.

You can navigate back and forth between records easily.

Bug Tracker
===========

Bugs are tracked on `GitHub Issues <https://github.com/OCA/connector-lims/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 <https://github.com/OCA/connector-lims/issues/new?body=module:%20lims_account%0Aversion:%2018.0%0A%0A**Steps%20to%20reproduce**%0A-%20...%0A%0A**Current%20behavior**%0A%0A**Expected%20behavior**>`_.

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

Credits
=======

Authors
-------

* Open Source Integrators

Contributors
------------

- Rodrigo Madrid rmadrid@opensourceintegrators.com
- Adriana Alpizar aalpizar@opensourceintegrators.com
- Maxime Chambreuil mchambreuil@opensourceintegrators.com
- Nikul Chaudhary nchaudhary@opensourceintegrators.com

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.

.. |maintainer-max3903| image:: https://github.com/max3903.png?size=40px
:target: https://github.com/max3903
:alt: max3903
.. |maintainer-jasiel-osi| image:: https://github.com/jasiel-osi.png?size=40px
:target: https://github.com/jasiel-osi
:alt: jasiel-osi
.. |maintainer-Nikul-OSI| image:: https://github.com/Nikul-OSI.png?size=40px
:target: https://github.com/Nikul-OSI
:alt: Nikul-OSI

Current `maintainers <https://odoo-community.org/page/maintainer-role>`__:

|maintainer-max3903| |maintainer-jasiel-osi| |maintainer-Nikul-OSI|

This module is part of the `OCA/connector-lims <https://github.com/OCA/connector-lims/tree/18.0/lims_account>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
3 changes: 3 additions & 0 deletions lims_account/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Copyright (C) 2025 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from . import models
19 changes: 19 additions & 0 deletions lims_account/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright (C) 2025 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
{
"name": "Laboratory Information Management System (LIMS) Account",
"summary": "Allows invoicing LIMS orders and linking invoices to LIMS orders",
"version": "18.0.1.0.0",
"license": "AGPL-3",
"category": "Accounting",
"author": "Open Source Integrators, Odoo Community Association (OCA)",
"website": "https://github.com/OCA/connector-lims",
"depends": ["lims", "account"],
"data": [
"views/account_move_views.xml",
"views/lims_order_views.xml",
],
"application": False,
"development_status": "Beta",
"maintainers": ["max3903", "jasiel-osi", "Nikul-OSI"],
}
5 changes: 5 additions & 0 deletions lims_account/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (C) 2025 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from . import account_move
from . import lims_order
34 changes: 34 additions & 0 deletions lims_account/models/account_move.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright (C) 2025 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import _, api, fields, models


class AccountMove(models.Model):
_inherit = "account.move"

lims_order_ids = fields.Many2many(
comodel_name="lims.order",
relation="lims_order_account_move_rel",
column1="move_id",
column2="lims_order_id",
string="LIMS Orders",
)
lims_order_count = fields.Integer(
compute="_compute_lims_order_count", string="LIMS Orders Count"
)

@api.depends("lims_order_ids")
def _compute_lims_order_count(self):
for rec in self:
rec.lims_order_count = len(rec.lims_order_ids)

def action_open_lims_orders(self):
self.ensure_one()
return {
"name": _("LIMS Orders"),
"type": "ir.actions.act_window",
"res_model": "lims.order",
"view_mode": "list,form",
"domain": [("id", "in", self.lims_order_ids.ids)],
}
34 changes: 34 additions & 0 deletions lims_account/models/lims_order.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Copyright (C) 2025 Open Source Integrators
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).

from odoo import _, api, fields, models


class LimsOrder(models.Model):
_inherit = "lims.order"

account_move_ids = fields.Many2many(
comodel_name="account.move",
relation="lims_order_account_move_rel",
column1="lims_order_id",
column2="move_id",
string="Account Moves",
)
account_move_count = fields.Integer(
compute="_compute_account_move_count", string="Invoices Count"
)

@api.depends("account_move_ids")
def _compute_account_move_count(self):
for rec in self:
rec.account_move_count = len(rec.account_move_ids)

def action_open_account_moves(self):
self.ensure_one()
return {
"name": _("Invoices"),
"type": "ir.actions.act_window",
"res_model": "account.move",
"view_mode": "list,form",
"domain": [("id", "in", self.account_move_ids.ids)],
}
3 changes: 3 additions & 0 deletions lims_account/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
3 changes: 3 additions & 0 deletions lims_account/readme/CONFIGURE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Before installing this module:
1. Ensure both **account** and **lims** modules are installed and working.
2. The user must have access rights to both Accounting and LIMS modules.
4 changes: 4 additions & 0 deletions lims_account/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
* Rodrigo Madrid <rmadrid@opensourceintegrators.com>
* Adriana Alpizar <aalpizar@opensourceintegrators.com>
* Maxime Chambreuil <mchambreuil@opensourceintegrators.com>
* Nikul Chaudhary <nchaudhary@opensourceintegrators.com>
7 changes: 7 additions & 0 deletions lims_account/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
The **lims_account** module provides a bridge between the **LIMS (Laboratory Information Management System)** and **Odoo Accounting**.

It introduces a bi-directional link between **LIMS Orders** and **Invoices**, enabling users to:

- Associate one or multiple invoices (`account.move`) with one or multiple LIMS orders (`lims.order`).
- Quickly navigate between LIMS Orders and their corresponding Invoices using smart buttons.
- View related records directly in each form without leaving the current screen.
27 changes: 27 additions & 0 deletions lims_account/readme/USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# From an Invoice (Customer/Vendor Bill)
1. Go to **Accounting → Customers → Invoices** (or Vendor Bills).
2. Open any invoice record.
3. In the **LIMS Integration** section, click **Add a line** in the *LIMS Orders* field.
4. Select one or more **LIMS Orders** from the list.
5. Save the record.

✅ The invoice is now linked to those LIMS Orders.
A **“LIMS Orders”** smart button appears in the header showing the total count of linked orders.

---

# From a LIMS Order
1. Go to **LIMS → Orders**.
2. Open any LIMS Order record.
3. Use the **Invoices** smart button in the header.
4. Add or view linked invoices in the *Account Moves* field.

✅ The LIMS Order will now show all related invoices.

---

# 👁️ Viewing Linked Records
- On an **Invoice**, click the **LIMS Orders** smart button to open all linked LIMS Orders.
- On a **LIMS Order**, click the **Invoices** smart button to open all linked invoices.

You can navigate back and forth between records easily.
Loading
Loading