Skip to content

Commit

Permalink
Merge remote-tracking branch 'odoo/17.0' into 17.0
Browse files Browse the repository at this point in the history
  • Loading branch information
OCA-git-bot committed Sep 16, 2024
2 parents ef49101 + 176bfcb commit b9cd595
Show file tree
Hide file tree
Showing 58 changed files with 2,025 additions and 1,699 deletions.
9 changes: 9 additions & 0 deletions .tx/config
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,15 @@ resource_name = account_edi_ubl_cii
replace_edited_strings = false
keep_translations = false

[o:odoo:p:odoo-17:r:account_edi_ubl_cii_tax_extension]
file_filter = addons/account_edi_ubl_cii_tax_extension/i18n/<lang>.po
source_file = addons/account_edi_ubl_cii_tax_extension/i18n/account_edi_ubl_cii_tax_extension.pot
type = PO
minimum_perc = 0
resource_name = account_edi_ubl_cii_tax_extension
replace_edited_strings = false
keep_translations = false

[o:odoo:p:odoo-17:r:account_fleet]
file_filter = addons/account_fleet/i18n/<lang>.po
source_file = addons/account_fleet/i18n/account_fleet.pot
Expand Down
2 changes: 1 addition & 1 deletion addons/account/views/account_move_views.xml
Original file line number Diff line number Diff line change
Expand Up @@ -975,7 +975,7 @@
invisible="context.get('default_journal_id') and context.get('move_type', 'entry') != 'entry'">
<field name="journal_id"
options="{'no_create': True, 'no_open': True}"
readonly="posted_before"/>
readonly="posted_before and name not in (False, '', '/')"/>
<span class="oe_inline o_form_label mx-3"
groups="base.group_multi_currency"
invisible="move_type == 'entry'"> in </span>
Expand Down
2 changes: 1 addition & 1 deletion addons/crm/models/crm_lead.py
Original file line number Diff line number Diff line change
Expand Up @@ -1875,7 +1875,7 @@ def _get_customer_information(self):

for record in self.filtered('email_normalized'):
values = email_normalized_to_values.setdefault(record.email_normalized, {})
contact_name = record.contact_name or record.partner_name or parse_contact_from_email(record.email_from)[0]
contact_name = record.contact_name or record.partner_name or parse_contact_from_email(record.email_from)[0] or record.email_from
# Note that we don't attempt to create the parent company even if partner name is set
values.update(record._prepare_customer_values(contact_name, is_company=False))
values['company_name'] = record.partner_name
Expand Down
3 changes: 2 additions & 1 deletion addons/crm/tests/test_crm_lead_notification.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ def test_lead_message_get_suggested_recipients_values_for_create(self):
(False, 'Test', 'test_default_create@example.com'),
('Delivery Boy company', 'Test With Company', 'default_create_with_partner@example.com'),
('Delivery Boy company', '', 'default_create_with_partner_no_name@example.com'),
('', '', 'lenny.bar@gmail.com'),
]:
formatted_email = formataddr((name, email)) if name else formataddr((partner_name, email))
with self.subTest(partner_name=partner_name):
Expand All @@ -197,7 +198,7 @@ def test_lead_message_get_suggested_recipients_values_for_create(self):
self.assertEqual(create_vals, lead1._get_customer_information().get(email, {}))
for field, value in lead_details_for_contact.items():
self.assertEqual(create_vals.get(field), value)
expected_name = partner_name if partner_name and not name else name
expected_name = name or partner_name or email
self.assertEqual(create_vals['name'], expected_name)
self.assertEqual(create_vals['comment'], description) # description -> comment
# Parent company not created even if partner_name is set
Expand Down
5 changes: 3 additions & 2 deletions addons/hw_drivers/iot_handlers/drivers/DisplayDriver_L.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,9 @@ def update_url(self, url=None):
# Kill browser instance (can't `instance.pkill()` as we can't keep the instance after Odoo service restarts)
# We need to terminate it because Odoo will create a new instance each time it is restarted.
subprocess.run(['pkill', self.browser.split('-')[0]], check=False)
# --log-level=3 to avoid useless log messages
subprocess.Popen([self.browser, self.url, '--start-fullscreen', '--log-level=3'], env=browser_env)
# --log-level=3 to avoid useless log messages, --bwsi to use chromium without signing in
browser_args = ['--start-fullscreen', '--log-level=3', '--bwsi']
subprocess.Popen([self.browser, self.url, *browser_args], env=browser_env)

# To remove when everyone is on version >= 24.08: chromium has '--start-fullscreen' option
if self.browser == 'firefox':
Expand Down
12 changes: 7 additions & 5 deletions addons/hw_drivers/tools/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,12 +288,14 @@ def get_ssid():

@cache
def get_odoo_server_url():
if platform.system() == 'Linux':
ap = subprocess.call(['systemctl', 'is-active', '--quiet', 'hostapd']) # if service is active return 0 else inactive
if not ap:
return False
"""Get the URL of the linked Odoo database.
If the IoT Box is in access point mode, it will return ``None`` to avoid
connecting to the server.
return get_conf('remote_server')
:return: The URL of the linked Odoo database.
:rtype: str or None
"""
return None if access_point() else get_conf('remote_server')


def get_token():
Expand Down
2 changes: 1 addition & 1 deletion addons/hw_posbox_homepage/__manifest__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
""",
'assets': {
'web.assets_backend': [
'hw_posbox_homepage/static/img/*',
'hw_posbox_homepage/static/*/**',
],
},
'installable': False,
Expand Down
1 change: 1 addition & 0 deletions addons/hw_posbox_homepage/controllers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
# Part of Odoo. See LICENSE file for full copyright and licensing details.

from . import main
from . import homepage
Loading

0 comments on commit b9cd595

Please sign in to comment.