19 Commits
Author SHA1 Message Date
AH-Yussef 3aa2d05213 [FIX] pos_restaurant: avoid printing empty receipts when tip after payment is active
Steps to reproduce:
- Install POS app.
- Go to POS settings and enable:
    - Is a Bar/Restaurant
    - Tips > Add tip after payment
- Open a POS session -if first time, add a floor and a table-
- Add a product
- Click on payment
- Choose a payment method
- Click on Close Tab
- The print popup is shown twice in a row with an empty subtotal amount.

Investigation:
- Inside the `TipReceipt` template, the `total` is not shown as the class lacks a getter for it [1]
- Also when there is no printer, we won't fallback to the web printer as it's annoying to the cashier.

[1]: https://github.com/odoo/odoo/blob/1d49034782e3ff0e4384bad4e927a895e2a97839/addons/pos_restaurant/static/src/app/tip_receipt/tip_receipt.xml#L13-L16

opw-3836549

closes odoo/odoo#161056

Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>
2024-04-24 14:48:56 +00:00
AH-Yussef 08104386e1 [FIX] web_editor: upload CORS images by URL
- Install E-commerce app
- Go to Website > Shop, and open a product
- Click on edit on the upper right corner.
- Double click the product image to change it. A popup is shown.
- In the popup, click on Add URL and place this URL [1]
- Click Save. The image disappears!

- The issue was introduced here [2]
- As URL now starts with `/web/image/` which will be later used here [3]
- The condition to enter this line is `url_object.path.startswith('/web/image')`
- `item[field]` is used which equals to `attachment[datas]`
- But actually `datas` is empty as the image upload fails because of CORS
- `add_url` is called [4] saving attachment without `datas` but with type URL

- The commit solves the issue by fetching the remote data from the server
if the url is a remote redirection, which still happens when the image
data cannot be fetched by the client browser at upload time.

[1]: https://lowendbox.com/wp-content/uploads/2022/09/odoo_logo_1200.png
[2]: https://github.com/odoo/odoo/commit/943944dd249c15de870d6800d89e48d54a422e5a#diff-0897c80484208197b0aff67f2b06509e864c3976de1589e3cebad2788eef008fR49
[3]: https://github.com/odoo/odoo/blob/f72968561acec164697a7a9ee0965ec304854dd5/addons/web_editor/models/ir_qweb_fields.py#L473
[4]: https://github.com/odoo/odoo/blob/f72968561acec164697a7a9ee0965ec304854dd5/addons/web_editor/controllers/main.py#L268

opw-3746245

closes odoo/odoo#160085

Signed-off-by: Benoit Socias (bso) <bso@odoo.com>
2024-04-19 19:14:00 +00:00
AH-Yussef 58790d58e1 [FIX] web: correctly align column values with column header
Steps to reproduce:
- Install planning app.
- Go to planning app, and convert the view to List.
- Group by Resource -for example-.
- Notice how the allocated time values are mis-aligned with the header label.

Investigation:
- in the planning tree view, notice the property `open_form_view` set to `True` https://github.com/odoo/enterprise/blob/418ea2114c7d935865dc52e5fd5a30d626987190/planning/views/planning_views.xml#L8
- In the `getGroupNameCellColSpan` method:
	- the `firstAggregateIndex` is `1` belonging to the `allocated_hours` (Allocated Time)column which set the `colspan = firstAggregateIndex = 1`
	- as `this.hasSelectors` is `true`, `colspan = colspan+1 = 2` (which is the correct value)
	- but now as the `open_form_view` was set to `True`, the `this.props.onOpenFormView` exists and so the `colspan = colspan+1 = 3` which makes the value be misaligned to the right by one column.

The proposed fix:
- As the `open_form_view` option add a View button to the end of the row, it makes sense to do the check with the `lastAggregateIndex` inside `getGroupPagerCellColspan` method.
- In our case:
	- the `lastAggregateIndex` is `1` belonging also to the `allocated_hours` which set the `colspan = this.state.columns.length - lastAggregateIndex - 1 = 3 - 1 - 1 = 1`
	- as we don't display optional fields this check fails https://github.com/odoo/odoo/blob/5af3cfc2b9ce648ae4aff69150266e4ad519050d/addons/web/static/src/views/list/list_renderer.js#L1025-L1027 and the `colspan = 1`
	- Now we check the `this.props.onOpenFormView` condition which set `colspan = colspan+1 = 2` which is correct.
- But what if we wanted to show the optional field `allocated_percentage` would this fix still work? Yes!
	- the `lastAggregateIndex` is `2` belonging to the `allocated_percentage` which set the `colspan = this.state.columns.length - lastAggregateIndex - 1 = 3 - 2 - 1 = 0`
	- as we do display an optional fields= this check works https://github.com/odoo/odoo/blob/5af3cfc2b9ce648ae4aff69150266e4ad519050d/addons/web/static/src/views/list/list_renderer.js#L1025-L1027 and the `colspan = colspan+1 = 2`
	- Now we check the `this.props.onOpenFormView` condition which set `colspan = colspan+1 = 3` which is correct.
- One last case, what if we have no aggregates
	- both firstAggregateIndex` = `lastAggregateIndex` = -1
	- we go into the else clause inside `getGroupPagerCellColspan`, making the `colspan = this.state.columns.length > 1 ? DEFAULT_GROUP_PAGER_COLSPAN : 0 = True ? DEFAULT_GROUP_PAGER_COLSPAN : 0 = DEFAULT_GROUP_PAGER_COLSPAN = 1
	- if the `open_form_view` was `True`, the colspan becomes `colspan = colspan+1 = 2`.

opw-3764616

closes odoo/odoo#156647

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2024-03-14 08:06:21 +00:00
AH-Yussef 2f847c4629 [FIX] stock_account: correct revaluation statement at general ledger report
Steps to reproduce:
- Install Sales, Accounting and Inventory apps.
- Go to Inventory > Configuration > Products > Product Categories.
- Open All / Saleable / Office Furniture and:
	- Set the Inventory Valuation as Automated
	- Set the Costing Method as First In First Out (FIFO)
- Go to Inventory > Reporting > Inventory Valuation
- Open the toggle header then Click on the plus button at the header.
- In the popup shown -Notice how the current value is 0-, set:
	- Added Value to 1000
	- Counterpart Account to 600000 Expenses
- Click on REVALUE, a new report appears.
- Open the newly created report > Other Info, open the Journal Entry
- In the Journal Items tab, notice the label says that `the valuation was changed from 1000 to 2000` while it should be `the valuation was changed from 0 to 2000`.

Investigation:
- the `current_value_svl` field is related to `product_id.value_svl` https://github.com/odoo/odoo/blob/7152fa4fb4a8b66ae72bbdc8177f2a787161f594/addons/stock_account/wizard/stock_valuation_layer_revaluation.py#L34
- Which get computend using `_compute_value_svl()` depending on `stock_valuation_layer_ids`
- When we revaluate, we trigger `action_validate_revaluation` that performs this line https://github.com/odoo/odoo/blob/7152fa4fb4a8b66ae72bbdc8177f2a787161f594/addons/stock_account/wizard/stock_valuation_layer_revaluation.py#L110 creating new stock.valuation.layer triggering the `_compute_value_svl()` method setting the product `value_svl` to the updated value (current + added) which then updates `current_value_svl` being a related field
- That's why now `current_value_svl` is the new value and not the old one.

opw-3715522

closes odoo/odoo#157450

X-original-commit: 065b6632b133d780543c9f40beb536c2ff37ff52
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Ali Hassan Youssef (alhy) <alhy@odoo.com>
2024-03-13 04:07:29 +00:00
AH-Yussef f72751dbfb [FIX] website_sale_loyalty: allow to remove coupon from cart
Steps to reproduce
- Install eCommerce app
- Go to Settings and enable Discounts, Loyalty & Gift Card option
- Go to Website app > eCommerce > Loyalty > Discount & Loyalty
- Create a new coupon by setting the Program Type to Coupons and then save.
- Generate a new coupon by clicking the GENERATE COUPONS button.
- Go to Website > site > Homepage
- Go to Shop page
- Add a product to the cart
- Apply the coupon code created
- Remove the coupon code by clicking the bin icon next to the coupon code line
- The coupon code is NOT removed.

Investigation
First, we'll take a look on what happens when a coupon code is applied
- When a coupon code is applied, a new sale.order.line is created for it.
- That triggers `super()._compute_website_order_line()` https://github.com/odoo/odoo/blob/d8ec7735aa8759fa94fc0223945ac9b19e05312e/addons/website_sale_loyalty/models/sale_order.py#L111 which filters out the discount order line https://github.com/odoo/odoo/blob/d8ec7735aa8759fa94fc0223945ac9b19e05312e/addons/website_sale/models/sale_order.py#L66 via the `_show_in_cart()` method https://github.com/odoo/odoo/blob/d8ec7735aa8759fa94fc0223945ac9b19e05312e/addons/website_sale_loyalty/models/sale_order_line.py#L12
- Then a new temporary sale.order.line is created by https://github.com/odoo/odoo/blob/d8ec7735aa8759fa94fc0223945ac9b19e05312e/addons/website_sale_loyalty/models/sale_order.py#L121 meaning that is has no `id`
- Note that we can only apply one coupon from the same program type.

Second, Let's take a look on what happens when we try to remove a coupon code
- A call is made to `cart_update_json()` which calls https://github.com/odoo/odoo/blob/d8ec7735aa8759fa94fc0223945ac9b19e05312e/addons/website_sale/controllers/main.py#L811-L819 which calls https://github.com/odoo/odoo/blob/d8ec7735aa8759fa94fc0223945ac9b19e05312e/addons/website_sale_loyalty/models/sale_order.py#L159
- But as noted above the coupon order line has no id being a temporary record. Hence the `line_id` is None which basically cancels the cart update.

opw-3744910

closes odoo/odoo#156553

X-original-commit: 1657d6f165f78f971d5bf975a8b4e366655d1ab0
Signed-off-by: Morgane Demesmaeker <edm@odoo.com>
Signed-off-by: Ali Hassan Youssef (alhy) <alhy@odoo.com>
2024-03-06 02:24:51 +00:00
AH-Yussef e603746bbe [FIX] website_hr_recruitment: allow to apply application form after removing linkedin field
Steps to reproduce:
- Install website_hr_recruitment module.
- Go to Recruitment app.
- Click on Job Page button on one of the position cards.
- Click on Apply Now! button.
- Click on Edit in the upper right corner.
- Remove the LinkedIn Profile, then save.
- Click on I'm feeling lucky button to apply the form.
- An error is raised indicating that `Cannot read properties of undefined (reading 'trim')`

Investigation:
- the linkedin field is grabbed by `const $linkedin_profile = $('#recruitment4');`
- and then is used to check the condition `$linkedin_profile.val().trim() === ''`
- but since the field no longer exists, the `$linkedin_profile.val()` is undefined and hence the error is raised

The Fix
- The functionality is to allow to apply the form if at least one of the linkedin or resume fields is non-empty
- we a field as empty if it:
	- doesn't exists
	- exists but is value-empty

opw-3754506

closes odoo/odoo#155336

Signed-off-by: Bertrand Dossogne (bedo) <bedo@odoo.com>
2024-03-05 08:27:45 +00:00
AH-Yussef 7f4e421bcb [FIX] stock: maintain route rule company consistency
Steps to reproduce:
- Create two companies:
    (ex. Daughter Company)
    (ex. Mother Company)
- Install Inventory app
- In the settings of both companies:
    - enable Multi-Step Routes
    - enable Dropshipping option
- Using the Daughter Company, go to Routes > Dropship route
- When You try to set Company to Daughter Company, it's possible to do so even thought the rules belonging to the Dropship route belongs to two companies: Daughter Company and Mother Company which is not consistant

Disscuss
- We constraint the route company to always be consistant with the rule(s) company and vice verca

opw-3648535

closes odoo/odoo#154403

X-original-commit: 0bc6057d986304a75ec0ba64141c965d9275f2f6
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Ali Hassan Youssef (alhy) <alhy@odoo.com>
2024-02-26 21:22:50 +00:00
AH-Yussef eefc83d5ca [FIX] website_sale: make invoice website_id depend on originating SO instead of partner
Steps to Reproduce
- Install E-Commerce app
- Add Demo payment provider in Test mode
- Go to Settings > Website > Invoicing and activate Automatic Invoice
- Go to Settings > Website and set the domain for:
	- My Website -we'll refer to it as website_1- as http://[IP_address]:[port] such as http://127.0.0.1:8069
	- My Website 2 -we'll refer to it as website_2- as http://[IP_address]:[port] such as http://127.0.0.2:8069
- Create a new product with Invoicing Policy as Ordered quantities
- Go to website_2 and add the new product to the cart and checkout
- With Debug mode on, Check the Emails sent via Settings > Technical > Email > Emails

Current Behavior
Two emails are automatically sent:
- An SO email that opens website_2 when clicking on View Sales Order button which is correct as we purchased the product through website_2
- An Invoice email that opens website_1 when clicking one View Invoice button which is WRONG as it should follow its originating SO and opens website_2 as well

Expected Behavior
Both SO and invoice emails should refer to the website where the SO was created -website_2 in our use case-

Observations
The automatic invoice always refer to website_1 regardless of the website where the SO was originally created.

Investigation
The website_id of the invoice is decided by the corresponding field https://github.com/odoo/odoo/blob/322889ea0a24c5eff2e3289502a2f606cb4048d0/addons/website_sale/models/account_move.py#L10-L13
- As noticed it's a related field to the partner_id.website_id which is False
- That's why the invoice website_id is also False leading to the preview button to fall back to website_1
- The partner_id.website_id is always False unless you manually added the field to the view and then set the website_id. Our case will work correctly if you set the website_id for the user/customer to website_2
- I also tried to sign up at website_2 to see if the website_id will be set accordingly but it stayed as False

Proposed Solution
make the invoice website_id relates to the originating SO instead of the partner

opw-3685742

closes odoo/odoo#154376

X-original-commit: 361e8f68af9c9656764906c8a44d22e1fed090a8
Signed-off-by: Ali Hassan Youssef (alhy) <alhy@odoo.com>
2024-02-21 12:59:05 +00:00
AH-Yussef 8fbbee1155 [FIX] sale: prevent recomputing unit price for expensed so lines
Steps to reproduce
- Install Sales, Accounting and purchase apps
- Go to Settings and activate Analytic Accounting option.
- Create a product that can be expensed and that is re-invoiced at cost + add cost
- Create an SO with another product and add an analytic account (activate analytic accounting if not activated by default) + confirm
- Create a PO with the expensable product and add the analytic account in the PO lines
- Receive product + create bill
- The product is added in the SO with 0 quantity and if I change the quantity to one, the price is recomputed according to the sales price (instead of taking into account the cost).

Investigation
- The `_compute_price_unit()` method doesn't take into account if the so line has been expensed or not

opw-3671812

closes odoo/odoo#153358

X-original-commit: 059b19c59a9222b676be5246eb94d680cf6bf27b
Signed-off-by: Ali Hassan Youssef (alhy) <alhy@odoo.com>
2024-02-09 11:57:33 +00:00
AH-Yussef 07b2c95369 [FIX] calendar: translate recurrence rule
Steps to reproduce:

1. install the calendar module
2. in General settings, add the French -or any- language
3. create a new event
4. under **Options** tab choose the recurrence type to be weekly
5. select the days to repeat the event on
6. save the event
7. send an email using the **EMAIL** button, you can notice that works like (Weeks) and the days’ names are not translated but still in English

Investigation

- the translation is applied on the model level, not on the code level. So we have to explicitly/programmatically translate the options.

Discussion

- In the proposed fix, we compute the recurrence rule `name` by translating it to the current language -the event creator's language- but as this field is **stored**, it resulted in another issue that the invitation emails sent to the participants had a mix of languages: the email template being translated in each participant's language while the recurrence rule itself is translated in the owner's language being a **stored** field
- That's why the fix got extended to embed translating of the recurrence rule directly into the template.
- However there's a **_limitation_** we couldn't deal with that's there are two types of emails we are concerned with:
    - invitation emails that follows `calendar attendee` model which works correctly as discussed
    - update emails that follows `calendar event` model coming from the composer which deosn't allow to properly use partners/participants languages

Resolution

- The update emails are sent in the owner's language, with the intention to enhance the behavior in master (Task-3677327)

opw-3483319

closes odoo/odoo#151669

X-original-commit: 1d6d12ab67ffc96719c3c329cdba1cc3e3471f36
Signed-off-by: Arnaud Joset (arj) <arj@odoo.com>
Signed-off-by: Ali Hassan Youssef (alhy) <alhy@odoo.com>
2024-02-08 18:24:09 +00:00
AH-Yussef ed95da37dc [FIX] base: translate partner display_name
Steps to reproduce:
- Install Contacts app
- Go to General Settings and add another language
- Add a new contact to a parent.
        - Don't add a specific contact name
        - Assign a contact type (delivery address, invoice address, other address)
- Go to the list or kanban view of the contancts and change the language
- The type of the contact listed next to the parent name is not translated from English.

Investigation:
- When the contact name is not set, the `display_name` displayed in both kanban and list views is set by concatinating the parent name with the contact type.
- The line https://github.com/odoo/odoo/blob/03b7e17faef4075dbbb805bca4e7f40f7fbcc988/odoo/addons/base/models/res_partner.py#L345 in the function `_compute_display_name`, `with_context({})` in particular basically enforce to compute the name in english language regardless of the active language. That actually makes sense as the `display_name` field has `store=True` https://github.com/odoo/odoo/blob/03b7e17faef4075dbbb805bca4e7f40f7fbcc988/odoo/addons/base/models/res_partner.py#L199

Solution:
- add a computed field that is not stored that gets recomputed on changing the language.

opw-3569171

closes odoo/odoo#147650

X-original-commit: 60b3ae846de59b1f6e71df68e99e29758ba734fe
Signed-off-by: Rémy Voet (ryv) <ryv@odoo.com>
Signed-off-by: Ali Hassan Youssef (alhy) <alhy@odoo.com>
2024-01-24 10:44:36 +00:00
AH-Yussef cced5ab357 [FIX] l10n_gcc_invoice: adjust messy invoice report layout saudi arabia
Steps to reproduce
- install the following modules:
        - Accounting
        - Studio
        - Saudi Arabia - Accounting (l10n_sa)
- Go to Settings > Users & Companies > Companies and create a New Company (named `SA Company` for example) with Saudi Arabia as the country in the address
- Switch to the new `SA Company`
- Go to Settings > Accounting
- Choose Saudi Arabia package as the Fiscal Localization package
- Go to Accounting and click on the studio icon (the one left of the user profile avatar)
- Click on reports
- Clear the filters
- Click on Invoices
- Click on the Company tagline box
- In the select box shown, choose `elif: o._get_name_invoice_report() == '|10n_gccarabic_english_invoice'`
- U can notice how the template is not rendered correctly

Invistigation:
- the major issue was the flex-direction: column; in https://github.com/odoo/enterprise/blob/e892bc8f022ed3962de06a61c1be181c89cdc831/web_studio/static/src/client_action/report_editor/report_iframe.scss#L170C1-L187C2 that caused the table header to be viewed as blocks
- Some xml tags / classes needed to be refined to enhance the layout

opw-3544938

closes odoo/odoo#148821

X-original-commit: db9498ccf8a6d5c51e691cbab04fc134ae310da9
Related: odoo/enterprise#54029
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Ali Hassan Youssef (alhy) <alhy@odoo.com>
2024-01-10 19:39:34 +00:00
AH-Yussef c7af687824 [FIX] purchase: set product control policy based on purchase bill policy
Steps to reproduce:
- Install Purchase and Inventory apps
- Go to General Settings > Purchase > Invoicing > Bill Control
- Choose "Ordered quantities" and Save
- Go to Purchase app > Products > Products
- Create a New product
- Set the product type to "Storable product"
- Go to "Purchase" tab > Control Policy
- Notice how the control policy is "On received quantities" although we set it up to be "On Ordered quantities"

Discussion:
- I added a compute method to manage the default **purchase method** value based on the res.config.setting **Bill Control**.
- I kept the behavior of setting the `purchase_method` to **receive** when the product type is **service** based on [task-2897867](https://www.odoo.com/web#id=2897867&cids=1&menu_id=4720&action=4043&model=project.task&view_type=form) which is associated with the commit **479a38466751e7bc31b26e5635b9735b37dde81f** and [PR](https://github.com/odoo/odoo/pull/96548)

opw-3552786

closes odoo/odoo#148585

X-original-commit: b0ea838364f63d25ca79211d8be5cbf332b6bf70
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
Signed-off-by: Ali Hassan Youssef (alhy) <alhy@odoo.com>
2024-01-10 07:27:05 +00:00
AH-Yussef 31c7a2ff90 [FIX] account: format transfer source containing %
Steps to reproduce:
- Install Accounting app
- Go to the Accounting app
- Go to Configuration > Chart of Accounts and create a New account with a name containing %
- Go to Accounting > Journal Items
- Select a Jounral item and from Actions, choose move to Account
- In the popup displayed, choose the new account created ealier in the To field, and choose a Journal
- Click `Create Journal Entries`, an error arises

Invistigation:
When the `account_target_name` contains a % literal (ex. "test %"), the `transfer_format` beccomes `"{amount} ({debit_credit}) from %s were transferred to <strong>test %</strong> by {link}"` https://github.com/odoo/odoo/blob/a56586119845969e9d867a220f5330a6c7daa5c2/addons/account/wizard/account_automatic_entry_wizard.py#L429-

- You can notice that now the string has two % placeholders that need two be substituted, but only argument is provided which is `account.display_name` and so we get a the error `TypeError: not enough arguments for format string` https://github.com/odoo/odoo/blob/a56586119845969e9d867a220f5330a6c7daa5c2/addons/account/wizard/account_automatic_entry_wizard.py#L433

opw-3601886

closes odoo/odoo#145762

X-original-commit: 1582a0ae28fec12175845dcfdebbb8d6b4bcde33
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Signed-off-by: Ali Hassan Youssef (alhy) <alhy@odoo.com>
2023-12-12 10:34:46 +00:00
AH-Yussef 230b680bf9 [FIX] website_sale: add message to translation
Steps to reproduce:
- install the e-commerce module
- in General settings, add and switch French -or any- language
- Go to website
- Under e-commerce > product in the menu bar
- click on any product
- click on go to website smart button
- click on edit button to edit the website page
- choose any block to insert, You can notice the message (DROP BUILDING BLOCKS HERE TO MAKE THEM AVAILABLE ACROSS ALL PRODUCTS) stays in English

Investigation
- The message is not add to website_sale.pot file, as the message string passed to an attribute not an actual string inside a tag.

opw-3573881

closes odoo/odoo#145755

X-original-commit: 9a595cd19fba3a68dacd5159d0b04102bc76cadf
Signed-off-by: Ali Hassan Youssef (alhy) <alhy@odoo.com>
2023-12-12 07:31:11 +00:00
AH-Yussef 0eeee0cd53 [FIX] sale_management: maintain template lines order on Confirm
Steps to reproduce:
- Install Sales app
- Open Sales app, Go to Configuration > Quotation Templates
- Open a template, or create an new one
- Add sections with product(s) under each, so we have a structure like:
        - Section 1
        - Product 1
        - Section 2
        - Product 2
- Go to Orders > Quotations
- Create a New Quotation
- Select the recently created/updated template in the Quotation Template field
- Click on Confirm
- U can notice how the sections are moved to the top, missing up the structure

Investigation:
- Each sale order order_line has a sequence property associated to it which defaults to 10 if not explicitly specified https://github.com/odoo/odoo/blob/55b452ac0056c7075097fa1324ef53fc5090fb7a/addons/sale/models/sale_order_line.py#L41
- On Choosing a template, the _prepare_order_line_values() method returns the needed properties for each template line https://github.com/odoo/odoo/blob/55b452ac0056c7075097fa1324ef53fc5090fb7a/addons/sale_management/models/sale_order.py#L108
- The returned object for each template is missing the sequence property, resulting in it falling back to 10 when assigning it to the sale order order_line https://github.com/odoo/odoo/blob/55b452ac0056c7075097fa1324ef53fc5090fb7a/addons/sale_management/models/sale_order.py#L117
- Now all order_line(s) has the same sequence -except for the first one which has a sequence value of -99- https://github.com/odoo/odoo/blob/55b452ac0056c7075097fa1324ef53fc5090fb7a/addons/sale_management/models/sale_order.py#L114-L115

opw-3602781

closes odoo/odoo#144700

Signed-off-by: Ali Hassan Youssef (alhy) <alhy@odoo.com>
2023-12-11 08:29:17 +00:00
AH-Yussef 7d58fe2c16 [FIX] web: align progress bar to end of table cell
Steps to reproduce:
- intall Employee app
- install HR Gamification module (not an app)
- Go to Employees app
- Go to Configuration > Challenges > Challenges
- Create a new challenge with goals and participants
- Go to Configuration > Challenges > Goals History
- Open up a group
- The word "Completeness" and the progress bar is not aligned correctly, the bar is supposed to be directly underneath the label.

Investigation
- The styling of the progress bar inside table cells https://github.com/odoo/odoo/blob/1f12670a8061a4eb3fd57abca238d8daf7ef574d/addons/web/static/src/views/fields/progress_bar/progress_bar_field.scss#L27-L32 was missing to align the progress bar to the end of the containing flex box

opw-3599052

closes odoo/odoo#145190

X-original-commit: 9a02e535882bf6844fffdb7c6a71053645e3af68
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Ali Hassan Youssef (alhy) <alhy@odoo.com>
2023-12-06 14:07:57 +00:00
AH-Yussef 75cc7e99be [FIX] point_of_sale: change pos receipt item direction in rtl languages
Steps to reproduce:
1. In the general settings, add the Arabic(العربية) language
2. Install the POS (point of sales) module
3. Go to the administrator's profile and change Preferences > Languages to Arabic(العربية)
4. Open a new shop/pos session
5. Add any product
6. Click on payment(دفعة)  button
7. Choose the cash option under the payment method (طريقة الدفع)
8. Select a client (العميل)
9. Click on validate (تصديق)
10. Notice how the items format is incorrect, the quantity and price flipped and unreadable.

Investigation
- when switching to Arabic (an right to left language), the direction of the order line (price and quantity) was still ltr so the price and the quantity were flipped

opw-3580386

closes odoo/odoo#144754

Signed-off-by: Adrien Guilliams (adgu) <adgu@odoo.com>
Signed-off-by: Ali Hassan Youssef (alhy) <alhy@odoo.com>
2023-12-05 06:23:49 +00:00
AH-Yussef 9d9760bfb5 [FIX] website_event: change event date format based on language
Steps to reproduce:
- Install the Events module
- Go to the General Settings and add French translation and make sure to check the website 1 option
- Go to the Events module and select an event
- Click on Go To Website smart button on the right top corner
- On the event page, Change the language and notice the start and end date format

Investigation
- The bug is more present in version 16.0 and above. This version has just small issue with formatting since the day and the rest of the date were separate block.
- By Using the option format: ‘full’, the date can be formatted correctly depending on the language used

opw-3569167

closes odoo/odoo#142425

Signed-off-by: Adrien Widart (awt) <awt@odoo.com>
Signed-off-by: Ali Hassan Youssef (alhy) <alhy@odoo.com>
2023-11-21 07:56:10 +00:00