Skip to content

Commit

Permalink
Merge PR #1195 into 17.0
Browse files Browse the repository at this point in the history
Signed-off-by legalsylvain
  • Loading branch information
OCA-git-bot committed Nov 3, 2024
2 parents 0bf7a16 + 263364e commit 74c81f1
Show file tree
Hide file tree
Showing 16 changed files with 702 additions and 0 deletions.
79 changes: 79 additions & 0 deletions pos_order_copy/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
==============
Pos Order Copy
==============

..
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! This file is generated by oca-gen-addon-readme !!
!! changes will be overwritten. !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! source digest: sha256:15afbcfbd7ff0b646b5bbb008dbfdb7eff8cb51b08b53172535d77f16b3ea7b3
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
.. |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%2Fpos-lightgray.png?logo=github
:target: https://github.com/OCA/pos/tree/17.0/pos_order_copy
:alt: OCA/pos
.. |badge4| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png
:target: https://translation.odoo-community.org/projects/pos-17-0/pos-17-0-pos_order_copy
: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/pos&target_branch=17.0
:alt: Try me on Runboat

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

Copy orders on point of sale view.

**Table of contents**

.. contents::
:local:

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

Bugs are tracked on `GitHub Issues <https://github.com/OCA/pos/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/pos/issues/new?body=module:%20pos_order_copy%0Aversion:%2017.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
-------

* Dixmit
* INVITU

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

- Dixmit

- Enric Tobella

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.

This module is part of the `OCA/pos <https://github.com/OCA/pos/tree/17.0/pos_order_copy>`_ project on GitHub.

You are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.
1 change: 1 addition & 0 deletions pos_order_copy/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from . import models
21 changes: 21 additions & 0 deletions pos_order_copy/__manifest__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Copyright 2024 Dixmit,INVITU
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

{
"name": "Pos Order Copy",
"summary": """
Copy Orders from PoS Frontend""",
"version": "17.0.1.0.0",
"license": "AGPL-3",
"author": "Dixmit,INVITU,Odoo Community Association (OCA)",
"website": "https://github.com/OCA/pos",
"depends": ["point_of_sale"],
"assets": {
"point_of_sale._assets_pos": [
"pos_order_copy/static/src/**/*.js",
"pos_order_copy/static/src/**/*.xml",
],
},
"data": [],
"demo": [],
}
2 changes: 2 additions & 0 deletions pos_order_copy/models/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
from . import pos_order
from . import pos_session
18 changes: 18 additions & 0 deletions pos_order_copy/models/pos_order.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2024 Dixmit
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import fields, models


class PosOrder(models.Model):
_inherit = "pos.order"

date_order = fields.Datetime(copy=False)
user_id = fields.Many2one(copy=False)
last_order_preparation_change = fields.Char(copy=False)
sequence_number = fields.Integer(copy=False)
session_id = fields.Many2one(copy=False)
shipping_date = fields.Date(copy=False)
is_tipped = fields.Boolean(copy=False)
tip_amount = fields.Float(copy=False)
ticket_code = fields.Char(copy=False)
22 changes: 22 additions & 0 deletions pos_order_copy/models/pos_session.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright 2024 Dixmit
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl).

from odoo import models


class PosSession(models.Model):
_inherit = "pos.session"

def _pos_data_process(self, loaded_data):
result = super()._pos_data_process(loaded_data)
loaded_data["pos_order_copy_fields"] = [
field_name
for field_name, field in self.env["pos.order"]._fields.items()
if field.copy and field.store and not field.automatic and not field.compute
]
loaded_data["pos_order_line_copy_fields"] = [
field_name
for field_name, field in self.env["pos.order.line"]._fields.items()
if field.copy and field.store and not field.automatic and not field.compute
]
return result
3 changes: 3 additions & 0 deletions pos_order_copy/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[build-system]
requires = ["whool"]
build-backend = "whool.buildapi"
2 changes: 2 additions & 0 deletions pos_order_copy/readme/CONTRIBUTORS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
- Dixmit
- Enric Tobella
1 change: 1 addition & 0 deletions pos_order_copy/readme/DESCRIPTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Copy orders on point of sale view.
Binary file added pos_order_copy/static/description/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 74c81f1

Please sign in to comment.