Skip to content

[18.0][ADD] pos_automatic_cashdrawer_cashlogy#10

Open
P-H-Phuc wants to merge 10 commits into
18.0from
18.0-mig-pos_automatic_cashdrawer
Open

[18.0][ADD] pos_automatic_cashdrawer_cashlogy#10
P-H-Phuc wants to merge 10 commits into
18.0from
18.0-mig-pos_automatic_cashdrawer

Conversation

@P-H-Phuc

@P-H-Phuc P-H-Phuc commented Dec 18, 2025

Copy link
Copy Markdown
Owner

This module was initially part of the Foodcoop set of addons. We're now migrating it to 18.0 and taking this occasion to contribute it to OCA.

@P-H-Phuc P-H-Phuc force-pushed the 18.0-mig-pos_automatic_cashdrawer branch 2 times, most recently from 1b555d4 to e8358c1 Compare December 23, 2025 04:25
@P-H-Phuc P-H-Phuc force-pushed the 18.0-mig-pos_automatic_cashdrawer branch 3 times, most recently from 8595408 to e0bd479 Compare January 21, 2026 08:58

@nguyenminhchien nguyenminhchien left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Take the benefit from configuration of native Odoo, this module just allows to connect to a different ip/port from the IoT box.

help="An automatic cashdrawer is available on the Proxy",
)

iface_automatic_cashdrawer_ip_address = fields.Char(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found no usage of this field nor iface_automatic_cashdrawer_tcp_port

),
)

group_pos_automatic_cashlogy_config = fields.Many2one(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

found no usage of this field

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This group is used to show Cashlogy Amin in menu POS

useProxy() {
return this.config.iface_automatic_cashdrawer || super.useProxy(...arguments);
},
async checkOpeningBalanceMissing() {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found no place call this function

async callAutomaticCashdrawerDisplayTransactionStart(amount, options = {}) {
try {
this.ui.block();
const res = await this.hardwareProxy.message(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should not call message or harwareProxy. This module will connect to different ip:port from IoT box.
Just reminding you that native Odoo has already support cashbox feature.
This module extends that feature by connecting to different server than the one of IoT.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using sendCashlogy() to call cashlogy via rpc service

class PosPaymentMethod(models.Model):
_inherit = "pos.payment.method"

iface_automatic_cashdrawer = fields.Boolean(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need this one, using the cash control from native Odoo.

class ResConfigSettings(models.TransientModel):
_inherit = "res.config.settings"

pos_iface_automatic_cashdrawer = fields.Boolean(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to add new field, Native odoo has a field for cash drawer
image

@P-H-Phuc P-H-Phuc force-pushed the 18.0-mig-pos_automatic_cashdrawer branch from e0bd479 to 76dac0b Compare January 27, 2026 07:52
@P-H-Phuc

Copy link
Copy Markdown
Owner Author
Screencast.from.2026-01-27.14-59-37.webm

@P-H-Phuc

Copy link
Copy Markdown
Owner Author

Screencast.from.2026-01-27.14-59-37.webm

Help me check this feature, I didn't test it in v12.0

@nguyenminhchien nguyenminhchien left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strange url:

Image

// FIXME: error?
_showError(error) {
this.dialog.closeAll();
const message = error ? error?.data?.message : _t("Cashdrawer not connected");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems there's no data from error but message directly:

Image

// FIXME: error?
_showError(error) {
this.dialog.closeAll();
const message = error ? error?.data?.message : _t("Cashdrawer not connected");

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check, you may need to get the message directly from error

Image

@nguyenminhchien nguyenminhchien left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Nothing happens when clicking on the button "Print"
Image
  • Show message when Add / Dispense cash, similar when take cash in /out:
Image
  • Error when clicking on "Empty Stacker"
Image

@P-H-Phuc

Copy link
Copy Markdown
Owner Author

@nguyenminhchien Error when clicking on "Empty Stacker"

In Fakebox, when call "display_empty_stacker" endpoint => return a boolean
In hw_automatic_cashdrawer_cashlogy => return a float

This reponse is used to show currency value, so I think it cannot a boolean

@nguyenminhchien

Copy link
Copy Markdown

@nguyenminhchien Error when clicking on "Empty Stacker"

In Fakebox, when call "display_empty_stacker" endpoint => return a boolean In hw_automatic_cashdrawer_cashlogy => return a float

This reponse is used to show currency value, so I think it cannot a boolean

No syntax error in any case.

@P-H-Phuc P-H-Phuc force-pushed the 18.0-mig-pos_automatic_cashdrawer branch from 76dac0b to 1ab9f7e Compare January 30, 2026 08:29
await this.pos.sendCashlogy("print_xml_receipt", {
receipt: xmlReportElement.outerHTML,
});
this.notification.add(_t("Print Inventory Successfully"));

This comment was marked as resolved.

await this.pos.sendCashlogy("print_xml_receipt", {
receipt: xmlReportElement.outerHTML,
});
this.notification.add(_t("Close Till / ADDED Successfully"));

This comment was marked as resolved.

await this.pos.sendCashlogy("print_xml_receipt", {
receipt: xmlReportElement.outerHTML,
});
this.notification.add(_("Close Till / DISPENSED Successfully"));

This comment was marked as resolved.

This comment was marked as resolved.

await this.pos.sendCashlogy("print_xml_receipt", {
receipt: xmlReportElement.outerHTML,
});
this.notification.add(_t("Send Cancel Successfully"));

This comment was marked as resolved.

await this.pos.sendCashlogy("print_xml_receipt", {
receipt: xmlReportElement.outerHTML,
});
this.notification.add(_t("Complete Emptying Successfully"));

This comment was marked as resolved.

await this.pos.sendCashlogy("print_xml_receipt", {
receipt: xmlReportElement.outerHTML,
});
this.notification.add(_t("Empty Stacker Successfully"));

This comment was marked as resolved.

}

async action_display_backoffice() {
return await this.pos.callAutomaticCashlogyDisplayBackoffice();

This comment was marked as resolved.

@P-H-Phuc P-H-Phuc force-pushed the 18.0-mig-pos_automatic_cashdrawer branch from 1ab9f7e to 7056006 Compare February 6, 2026 04:52
* HELPERS
**/

_getCashlogyIP() {

This comment was marked as resolved.

@P-H-Phuc P-H-Phuc force-pushed the 18.0-mig-pos_automatic_cashdrawer branch from 7056006 to 71efdf0 Compare February 9, 2026 10:15
@P-H-Phuc P-H-Phuc force-pushed the 18.0-mig-pos_automatic_cashdrawer branch 2 times, most recently from 2b0e5b7 to 6e6668f Compare June 18, 2026 07:39
@P-H-Phuc P-H-Phuc changed the title [18.0][ADD] pos_automatic_cashdrawer [18.0][ADD] pos_automatic_cashdrawer_cashlogy Jun 18, 2026
@P-H-Phuc

Copy link
Copy Markdown
Owner Author

@nguyenminhchien, I renamed pos_automatic_cashdrawer to pos_automatic_cashdrawer_cashlogy.

Consider the same module: https://github.com/OCA/pos/pull/1557

@P-H-Phuc P-H-Phuc force-pushed the 18.0-mig-pos_automatic_cashdrawer branch from 6e6668f to 0411368 Compare June 23, 2026 04:49
@P-H-Phuc P-H-Phuc force-pushed the 18.0-mig-pos_automatic_cashdrawer branch from 0411368 to 9cded52 Compare June 23, 2026 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants