Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[16.0] [IMP] Resource: allow plan_days over 100 days #101

Draft
wants to merge 37 commits into
base: 16.0
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
60c05c4
[IMP] l10n_eu_oss: Restore pre covid rates on Luxembourg fpos
Megaaaaaa Dec 3, 2024
4ac45ff
[FIX] auth_signup: prevent error when resetting the password
reka-odoo Oct 22, 2024
c931566
[FIX] testing: set dbname on current thread for standalone tests
thle-odoo Dec 11, 2024
cab6183
[FIX] spreadsheet: apply global filters after pivot update
pro-odoo Dec 17, 2024
ce92ded
[FIX] l10n_in_edi_ewaybill: inward and outward type for credit note
hamo-odoo Dec 17, 2024
6c15f0e
[FIX] spreadsheet: apply global filters after list update
pro-odoo Dec 17, 2024
116364e
[FIX] sale_timesheet: protect timesheet product company id
vandroogenbd Nov 22, 2024
0ebf80b
[IMP] l10n_fr: Update COA and account groups
FlorianGilbert Oct 28, 2024
301467d
[FIX] {purchase_,}stock: decrease the SOL qty with MTSO rule
lase-odoo Dec 17, 2024
ae305d1
[FIX] l10n_be_pos_sale: activate default invoice only with intracom t…
sbel-odoo Dec 5, 2024
423c254
[FIX] website_*: allow website designers to access mailing lists (ro)
SergeBayet Dec 10, 2024
8466f57
[FIX] stock_landed_costs: exclude uncreated landed cost lines
LouisGobert Dec 17, 2024
8a15eb6
[FIX] website: restore tooltips (+ translations) on website switcher
qsm-odoo Dec 17, 2024
d4faf4c
[FIX] account_edi: show EDI fields in vendor bills
yajo Dec 5, 2024
44fafbb
[FIX] web: remove flicker with the avatar widget
sauc-odoo Nov 13, 2024
b2e2927
[FIX] point_of_sale: not show discount on price manually set
sbel-odoo Dec 16, 2024
e61d6b8
[FIX] iap: handle timeout error while calling JSON-RPC endpoint
maan-odoo Dec 17, 2024
3a63c90
[FIX] hw_drivers: always use pi as home directory
loouis-t Dec 18, 2024
da1f44c
[FIX] account_edi_ubl_cii: remove ZIP constraint on facturx
clbr-odoo Dec 19, 2024
65a8500
[FIX] website: fix dropping inner content near an image link
bvr-odoo Dec 18, 2024
8430842
[FIX] web_editor: prevents dropping building blocks into an image field
bvr-odoo Dec 16, 2024
e3f7e13
[FIX] spreadsheet: update o_spreadsheet to latest version
pro-odoo Dec 19, 2024
76e1b0a
[FIX] l10n_ch: force report paper format with snailmail
mathcoutant Dec 17, 2024
1b999e4
[FIX] delivery: avoid carrier UserError in batch picking validation
lase-odoo Dec 10, 2024
18320c4
[FIX] website_livechat: prevent parseerror on installing website_live…
ayve-odoo Dec 4, 2024
bb22737
[FIX] hr_expense: Fix bad commercial_partner_id
JulienAlardot Nov 19, 2024
5f5a774
[FIX] payment_authorize: stop logging authentication data
ltinel Dec 19, 2024
a85158a
[FIX] l10n_id: Display tax percentage instead of code on purchase order
st-yes Nov 19, 2024
534de1e
[FIX] sale_loyalty: fixed taxes not paid by gift card
agr-odoo Dec 20, 2024
36a3df2
[IMP] account: Create _get_write_off_move_move_line_dict() method to …
victoralmau Nov 27, 2024
2c68b66
[FIX] hr_expense: Use bank account defined on employee form on create…
seifgneedy Dec 6, 2024
43142de
[FIX] website_payment: fix s_donation slider for RTL languages
robinlej Dec 20, 2024
b3578bb
[I18N] Update translation terms from Transifex
C3POdoo Dec 22, 2024
93ed8cc
[FIX] core: one2many field domains
kmagusiak Dec 19, 2024
da38ae2
[FIX] sale: product company constrains
svs-odoo Nov 16, 2023
0cd42f8
[FIX] website_slides: fix website description field
bvr-odoo Dec 13, 2024
b919876
[IMP] resource: allow plan_days over 100 days
ThomasBinsfeld Dec 24, 2024
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
Prev Previous commit
Next Next commit
[FIX] hw_drivers: always use pi as home directory
To allow compatibility between all db versions and new IoT Box images, we need
to ensure that `path_file` method returns the path starting from `/home/pi`
instead of the path of the service user (which is `/home/odoo` in newer images).

closes odoo#190963

Signed-off-by: Yaroslav Soroko (yaso) <[email protected]>
loouis-t committed Dec 19, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 3a63c90fff615b70881131e11d7375af2ae082a6
8 changes: 4 additions & 4 deletions addons/hw_drivers/iot_handlers/drivers/KeyboardUSBDriver_L.py
Original file line number Diff line number Diff line change
@@ -181,7 +181,7 @@ def save_layout(self, layout):
- variant (str): An optional key to represent the variant of the
selected layout
"""
file_path = Path.home() / 'odoo-keyboard-layouts.conf'
file_path = helpers.path_file('odoo-keyboard-layouts.conf')
if file_path.exists():
data = json.loads(file_path.read_text())
else:
@@ -193,7 +193,7 @@ def load_layout(self):
"""Read the layout from the saved filed and set it as current layout.
If no file or no layout is found we use 'us' by default.
"""
file_path = Path.home() / 'odoo-keyboard-layouts.conf'
file_path = helpers.path_file('odoo-keyboard-layouts.conf')
if file_path.exists():
data = json.loads(file_path.read_text())
layout = data.get(self.device_identifier, {'layout': 'us'})
@@ -213,7 +213,7 @@ def _is_scanner(self):
scanner_name = ['barcode', 'scanner', 'reader']
is_scanner = any(x in device_name for x in scanner_name) or self.dev.interface_protocol == '0'

file_path = Path.home() / 'odoo-keyboard-is-scanner.conf'
file_path = helpers.path_file('odoo-keyboard-is-scanner.conf')
if file_path.exists():
data = json.loads(file_path.read_text())
is_scanner = data.get(self.device_identifier, {}).get('is_scanner', is_scanner)
@@ -255,7 +255,7 @@ def _save_is_scanner(self, data):
We need that in order to keep the selected type of device after a reboot.
"""
is_scanner = {'is_scanner': data.get('is_scanner')}
file_path = Path.home() / 'odoo-keyboard-is-scanner.conf'
file_path = helpers.path_file('odoo-keyboard-is-scanner.conf')
if file_path.exists():
data = json.loads(file_path.read_text())
else:
13 changes: 8 additions & 5 deletions addons/hw_drivers/tools/helpers.py
Original file line number Diff line number Diff line change
@@ -389,8 +389,7 @@ def download_iot_handlers(auto=True):
if resp.data:
delete_iot_handlers()
with writable():
drivers_path = ['odoo', 'addons', 'hw_drivers', 'iot_handlers']
path = path_file(str(Path().joinpath(*drivers_path)))
path = path_file('odoo', 'addons', 'hw_drivers', 'iot_handlers')
zip_file = zipfile.ZipFile(io.BytesIO(resp.data))
zip_file.extractall(path)
except Exception:
@@ -431,12 +430,16 @@ def odoo_restart(delay):
IR = IoTRestart(delay)
IR.start()

def path_file(filename):
def path_file(*args):
"""Return the path to the file from IoT Box root or Windows Odoo
server folder
:return: The path to the file
"""
platform_os = platform.system()
if platform_os == 'Linux':
return Path.home() / filename
return Path("~pi", *args).expanduser() # Path.home() returns odoo user's home instead of pi's
elif platform_os == 'Windows':
return Path().absolute().parent.joinpath('server/' + filename)
return Path().absolute().parent.joinpath('server', *args)

def read_file_first_line(filename):
path = path_file(filename)