Let's assume that
* Company S is a sub company of it's parent company P
* Company S has access to all the accounts and taxes of company P
* Some taxes are archived, but used
Because of the needed access rules, there will be a `parent_of` on the
record rules of accounts and taxes.
If we consider that we should consider the context key `active_test` to
add a implicit `('active', '=', True)` clause in the domain when
evaluating `parent_of` and `child_of` clauses, an access error will be
raised instead of hiding the archived records, even when simply trying
to read an archived record.
The archive feature and the security rules should be independent; if a
security rules needs to depend on the fact that a record is archived, it
should be explicit in the domain and not rely on side effects of the
implementation of `parent_of`/`child_of`
Part-of: odoo/odoo#125642
The interraction between currency rates owned by branches can not be
defined clearly.
It would also make the currency rates tables a lot bigger.
task-3371677
Part-of: odoo/odoo#125642
Add fields and tooling to support sub companies.
The new fields are
* `parent_ids`, which consists of all the ancestors of the current
company
* `root_id`, the upmost parent, which is the company controlling the
subsidiaries
* `parent_path` is added to avoid a hit on the performances when using
the multibranch feature
Also add a mechanism to ensure some fields are shared with a root
company and all it's descendents.
All fields listed by `_get_company_root_delegated_field_names` will be
readonly and copied from the `root_id`.
task-3371677
Part-of: odoo/odoo#125642
Before this commit:
Previously, when the property field was deleted, a confirmation dialog box would
open. However, this resulted in an issue where both the property field dialog
box and the confirmation dialog box overlap.
After this commit:
With this fix, when a property field is deleted, the property field dialog box
now closes before the confirmation dialog box opens. This ensures that there is
no visual overlap between the two dialog boxes.
Task-3371734
closesodoo/odoo#129080
X-original-commit: 971826ab02e7e4134e73c498d85867a74088eaf9
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
*: test_website, website
Steps to reproduce the bug:
- Drag and drop a text-image snippet onto the page.
- Add a shape to the image of the snippet by selecting the shape from
the options.
- Click on the "replace" button in the options of the image.
- In the media dialog, navigate to the "icons" tab.
- Choose an icon.
- Inspect the HTML code of the icon in the DOM.
- Bug: The 'data-shape' attribute with a value is still present.
After this commit, when replacing media, the transfer of element
attributes specific to "shape" elements only occurs towards an image and
no longer towards other media (e.g. icons).
We also prevent adding shapes to images that don't support it (e.g. SVG
files). Before this commit, when replacing a .jpeg image that had
a shape with a SVG image, the shape was not removed.
This commit also adds tests to prevent these bugs from reappearing.
task-3420533
closesodoo/odoo#129079
X-original-commit: 023b0b3124a7181fdf486df8c830bb16edd10aa6
Signed-off-by: Soukéina Bojabza (sobo) <sobo@odoo.com>
Steps to reproduce:
1. Go to Accounting
2. Go to Bank -> Operations
3. Select one of the lines
4. Try to create a statement
5. Traceback
Cause of the issue:
active_ids can be None
opw-3419257
closesodoo/odoo#129078
X-original-commit: 4af42cc815a50d29ba59c1f33703760e671b296c
Signed-off-by: Andrea Grazioso (agr) <agr@odoo.com>
Signed-off-by: Antoine Demany (ande) <ande@odoo.com>
Following #127245
It happens because `_should_bypass_reservation` has been removed in 15.0
and only exist on the `stock.move` object and not the `stock.move.line`
anymore
opw-3336131
closesodoo/odoo#129076
X-original-commit: 7e917e8713e246811531f9d7c90395242e544057
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
This patch solves two issues when loading translations from CSV files.
1. If there is a CoA from a custom module that is not available the load
fails.
2. If there is an uninstalled CoA in use some of its fields may be
missing thus loading values from CSV files may fail.
Both issues were observed during upgrades.
closesodoo/odoo#129068
X-original-commit: f2b2260683a284801aa0aa55850cfecb4a0ff0e4
Signed-off-by: William André (wan) <wan@odoo.com>
Signed-off-by: Alvaro Fuentes Suarez (afu) <afu@odoo.com>
This traceback raises when user remove the' product' while creating 'Sale Order'
To produce this issue:
1) Install 'sale_stock_margin'
2) Create a new "Sale Order" in sales
3) Give values to "customer" and click "confirm" button
4) Now in "Order Lines" click "Catalog" button
5) Add any "product" and remove it.
6) Now click back to Sale Order which created above through breadcrumb
7) Now remove the 'Product'
Note:- Make sure 'product_id' is visible in "Order lines".
Error: A traceback appears: "Expected singleton: product.product()"
On "_compute_purchase_price" method, product is referenced to
"compute average price".
See:-
https://github.com/odoo/odoo/blob/ee680a9365bba0ed4c0e5e741b3e8dce94fab9bd/addons/sale_stock_margin/models/sale_order_line.py#L10-L19
Because of user removed the 'product', it return none in self which leads to
above traceback.
sentry-4320939660
closesodoo/odoo#129067
X-original-commit: a5b04bebc80c3c483bfe2eaf6c22f47613a0f0a0
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
before this commit, on clicking the purchase kanban view,
it allows to quick create from the kanban view,
and the value entered is going to name of purchase order
after this commit, quick create is disabled
closesodoo/odoo#129028
X-original-commit: 9c9433f3ebd65cfee8eceb751481116488ced3fc
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
The domain was forced to fix multi-company rules, but now is missing
domain checking whether the resource.calendar.leave is of "leave" type.
This is set if the domain is None but since the domain is overridden, it
needs to be set explicitly
closesodoo/odoo#128993
X-original-commit: 4e91aed5c31114064514f5a9e9c0ab0332580208
Signed-off-by: Sofie Gvaladze (sgv) <sgv@odoo.com>
Signed-off-by: Kevin Baptiste <kba@odoo.com>
=== ISSUE 1 ===
The spacing between the navigation buttons in Calendar were managed
by a `gap-1` class. This worked but it was not consistent with
the navigation we have in project gantt view. In order to improve
the consistency of our UI, we need to make this look the same.
=== ISSUE 2 ===
If you navigate to Time Off and request a new time off, the datetime
picker `apply` position is not correct. This is due to the fact that
no `state.timeValues` is visible to position it accordingly. That means
we need to specify two different layout depending if these buttons are
visible or not.
== AFTER ===
We remove the `gap-1` class and add a `btn-group` class instead,
which manage the spacing between children buttons.
We also change the navigation icons to `arrows` one and fix two issues
related to the datetime picker :
- The gap between month name isn't computed as it should ;
- There is an issue with the position of the `apply` button
when no `state.timeValues` is displayed.
task-3389679
part of task-3326263
closesodoo/odoo#128460
X-original-commit: c0b354e14a18667463451aa6fe768bffcbb9da9a
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
use product tags to display information as color/image on the product
page, enable filtering by tags, add tags to specification/comparison
table. Remove the link between ribbons and tags because there is no use
as we are able to show the tags on the page, add ribbon to
product.product
task-3299538
closesodoo/odoo#124299
Related: odoo/upgrade#4824
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
This PR aims to improve two sale flows in project:
## Ease SO creation from project
### Purpose
Currently, users have to create a project on one side, create an SO on the other side and then manually link the two elements together for the project to be billable. This is not the most intuitive and creates friction during the creation of a project. Indeed, the user would reach a dead-end when configuring their project employee/SOL mapping, as new SOLs cannot be created from there. As a consequence, this task aims at giving users the possibility of creating an SO directly from their project.
### Changes
- Added a "Sales Order" stat button to the project form view.
- Contains SOs linked to the SOLs set on the project, its tasks and their timesheets.
- Hidden if the project is FSM, non-billable or without a partner.
- Sales Orders created through this stat button should have at least one product of type "service".
- If the project doesn't have a Sales Order Line, creating a SO sets the first service SOL of the created SO on the project.
## Offer a view on SOLs from project updates
### Purpose
Support the use-case of lawyer firms. Indeed, they usually create one SOL per action they complete for their customer. They need an easy to create a new SOL and a way to search among all of their SOLs. We are thus adding a link to the list of SOLs from the right-side panel of project updates.
### Changes
- Added a "Sales Order Items" stat button in project update.
- Contains the SOLs linked to the project, its tasks and their timesheets.
- Hidden if the project is FSM, non-billable or without a partner.
- SOLs created through this stat button will be added to the SO of the project.
- If there is no such SO or if the current user doesn't have access to it, a new SO will be created instead.
- Refactored the SOL form view to be able to easily reuse it for this flow.
- Following this change, the ability to create SOLs on the fly from a Many2one field was added to multiple places.
- Available in helpdesk.ticket, project.project and project.task form view, as well as project employee mapping.
- The name entered in the field will be used to get a default product for the SOL, if a product with a matching name can be found.
closesodoo/odoo#121263
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
Description:
Follow up on #128696, because the fw-port in 15.0 was merged before the
additional changes could've been added.
Affected versions:
15.0 -> master
opw-3302460
closesodoo/odoo#129081
X-original-commit: 6435bcb144a72ccfec3107d81b96c7eb2f4089fa
Signed-off-by: Piryns Victor (pivi) <pivi@odoo.com>
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
If applied, this commit will solve the issue of the list view selection when
the record is not actually created but it can be selected and can able to
perform the action.
Steps to produce:
- Open Accounting > Configurations > Chart of Accounts.
- Click on the 'New' button.
- Select the new line which has been added.
- Perform the 'Duplicate' action for that record.
This commit will fix the generic issue by preventing the record selection while
the record is in 'Edit' mode.
sentry - 4191036697
closesodoo/odoo#129000
X-original-commit: 5570216c8c852b5851526217858b5b7515309444
Signed-off-by: Mathieu Duckerts-Antoine (dam) <dam@odoo.com>
Signed-off-by: Parth Solanki (paso) <paso@odoo.com>
This commit allows creating SOLs on the fly from various places:
- Project employee mapping list view
- Project from view
- Task form view
Task-3278895
This commit hides the "Sales Order Line" field on tasks when no customer is set on them.
It doesn't really make sense to have a SOL without a partner, and it eases other flows to be able to assume that a SOL implies that there is a partner.
Task-3278895
This commit moves the "Sales Order Line" field in the project form view from `sale_timesheet` to `sale_project`,
as the field itself is introduced in `sale_project`
Task-3278895
This commit adds a "Sales Order Line" stat button in project updates to easily search among the SOLs of a project
and be able to create new ones.
Task-3278895
This commit adds a "Sales Order" stat button in the project form view to ease the creation of a SO from a project.
This stat button is displayed if the project is billable and has a partner.
Task-3278895
* = project,timesheet
This commit changes the label when grouping tasks and timesheets by sol in the
portal for records without sol from "No Sales Order Item" to "Not Billed",
which conveys more clearly to the user that the records are not billed.
Task-3278895
Before commit:
After sending e-invoice, when requesting for edi cancellation, e-invoice is also
cancelled even if error in response.
After commit:
After sending e-invoice, when requesting for edi cancellation,
e-invoice is not cancelled in case of error in response.
closesodoo/odoo#129074
X-original-commit: 2af74c260a6223256e3a975f1378bfa25728edfb
Signed-off-by: Josse Colpaert <jco@odoo.com>
Since the introduction of project_todo, access to the model project.task
for interal users has been extended to read/write/create/unlink. The
basic record rule for task visibility does in consequence need to manage
only the read access. A new record rule was introduced to manage
write/create/unlink access for project users. However, the read access
for this group was also managed by this new rule, which led to
evaluation of both ir.rule for project user.
related-https://github.com/odoo/odoo/pull/115390closesodoo/odoo#129058
X-original-commit: 0808286feb463f7618fdc2e72f010d151db8c9a3
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
The tests did not cover the cases where:
- the main record has no company;
- the linked record has no company.
closesodoo/odoo#129044
Signed-off-by: Raphael Collet <rco@odoo.com>
=== ISSUE 1 ===
When the Control Panel breadcrumb was not displayed (eg. after reloading
the page), the name of the last element was used. In this case, the name
was not truncated and could create a layout issue if it was too long.
=== ISSUE 2 ===
The breadcrumb was clipped on Firefox, letters such as "p", "j" or "y"
where partially hidden. This was due to the combination of a too small
line-height and the `overflow: hidden` applied on `breadcrumb-item > a`.
This commit fixes these issues.
task-3420194
Part of task-3326263
closesodoo/odoo#128582
X-original-commit: abbbaee7bd591285cef98275da931fd8a8f073cd
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Prior this commit, `.o_arrow_button`'s arrow didn't have the same
transition as the button itself which created a glitch on hover
task-3419220
part of task-3326263
closesodoo/odoo#128581
X-original-commit: 81adc9a1769171a8f1c3e59e0841186904fc7ebd
Signed-off-by: Pierre Paridans (app) <app@odoo.com>
Before this commit the `mail.shortcut` search view was
only available when installing `website_livechat_helpdesk`.
This search view focuses on classical `mail.shortcut` field
and could be used accross the different modules that use
this view.
This commit moves the search view to the mail module in order
to do so.
closesodoo/odoo#128120
Related: odoo/enterprise#43976
Related: odoo/upgrade#4925
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Steps to reproduce:
- Install website_sale, contact, l10n_ch
- make sure your company is in Switzerland and has all the address information
- in settings, activate QR
- in Accounting/Journals/Bank:add a bank account (iban: CH4431999123000889012; qr-iban: CH11 3000 5228 1308 3501 F)
- install and enable the provider "Wire Transfer"
- From the Website, create an order and make sure the customer set an Invoicing address in Switzerland (address + Country)
- Validate the order
- In Website/unpaid orders: select your order and Confirm the order
- Create and confirm the invoice
- Print the invoice
Issue:
User Error is raised
Cause:
With Swiss QR code you need to have a valid payment reference. That is, an ISR reference such as in
https://github.com/odoo/odoo/blob/c6631df1c5b0b6d4c2268a826ca150edd0ca653e/addons/l10n_ch/models/account_invoice.py#L90
But when you create an order from the website, it creates an automatic reference "SO0001" which, when converted to an invoice, stays the same.
Since the reference is prepoluted, the `_compute_l10n_ch_isr_number` will not be triggered and therefore will raise an error when trying to print the invoice.
Solution:
Check if the Customer Invoice Journal uses the swiss reference model, then we know that the swiss loca is installed and can call the correct function to compute the reference/
Note:
In the test we check that `payment_custom` is installed. It is because the `_set_pending` method checks taht the payment_provider.code is "custom"="wire_transfer" in which case the sale order reference is computed
https://github.com/odoo/odoo/blob/b4ed9537895ecee48ed146add4257af0aebeb3f4/addons/sale/models/payment_transaction.py#L54-L56
opw-3334534
closesodoo/odoo#127338
X-original-commit: dfa4844e57b67d16b181e1e58813cdbbc7efa956
Signed-off-by: Yolann Sabaux (yosa) <yosa@odoo.com>
Signed-off-by: Olivier Colson (oco) <oco@odoo.com>
Co-authored-by: flvr-odoo <flvr@odoo.com>
* Generate account payments (and require a journal)
* Be displayed as their custom mode instead of always 'Custom'
...
Commit also includes some side bugfixes/cleanup
task-3347338
closesodoo/odoo#126929
Related: odoo/enterprise#43418
Related: odoo/upgrade#4944
Signed-off-by: Antoine Vandevenne (anv) <anv@odoo.com>
This commit's purpose is to allow the user to set the company_id of a project to False, meaning the project is no longer restricted for the user who does not have access to the company of the project. This change induces a lot of other small behavior changes/approximation. Since some fields (currency_id, resource_calendar_id, etc) were company dependent, we had to updates some use cases.
task-3084819
closesodoo/odoo#122144
Related: odoo/enterprise#41363
Related: odoo/upgrade#4947
Signed-off-by: Xavier Bol (xbo) <xbo@odoo.com>
5 new mail templates have been created :
2 designed templates ("Graphic" (now "Training") and "Coffeebreak")
3 text-heavy templates
XML added in mass_mailing_themes/views/mass_mailing_themes_templates.xml
Images added in mass_mailing_themes/static/src/img
Some templates names were adapted :
Newsletter -> Event
Tech -> Blogging
VIP -> Coupon
Bold -> Magazine
Solar -> Promotion
Task-2714386
closesodoo/odoo#99311
Related: odoo/upgrade#4035
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Co-authored-by: Elisabeth Dickinson <edi@odoo.com>
Add 'training' theme, which is absolutely not something to use to train
yourself writing themes, but actually to sell trainings, like software
trainings to learn to write themes.
Task-2714386
Part-of: odoo/odoo#99311
Add a 'newsletter' theme that contains notably a photo of Fgi and Al, which
is probably the best motivational to use it.
Task-2714386
Part-of: odoo/odoo#99311
Some mail themes had to be renamed to fix inconsistencies and prepare future
changes
* Newsletter -> Event
* Tech -> Blogging
* VIP -> Coupon
* Bold -> Magazine
* Solar -> Promotion
Also bump version, as new themes imply quite a bit change for this module.
Task-2714386
Part-of: odoo/odoo#99311
Before this commit:
When returning a transfer in AVCO/FIFO, the return's value is not always
the same as the original delivery. The unit cost for the return was
rounded, which introduced rounding errors.
After this commit:
When returning a transfer in AVCO/FIFO, the return's unit cost is not
rounded, allowing the correct value to be set.
Steps to reproduce:
1. Create a product and change its category costing method to AVCO
2. Purchase the product qty: 1 price: 13.13
3. Purchase the product qty: 1 price: 12.20
4. Sell the 2 product and deliver it
5. Create a return for the delivery
6. The value on the delivery is 25.33, but 25.34 on the return
opw-3358531
closesodoo/odoo#129025
X-original-commit: 5043b4b5099dc395234c1d5d8422b8fa7f1d94c8
Signed-off-by: William Henrotin (whe) <whe@odoo.com>
When the user adds the "Title" or "Certificate" in a large number of
characters, the content goes beyond the window.
Technical:
By using this class it applies width 100%, which resolves the issue.
Now, the content stays within the sheet.
Task-3368902
closesodoo/odoo#129014
X-original-commit: 44720aa6e7080ce849af329d8c92681489e093fb
Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
In a sale order, an error is raised when selecting a product
(`product.template`) that has an archived variant if the product has a
single active attribute
Steps to reproduce:
1. Install Sales
2. Create a new product 'TEST'
3. Add the attribute 'Legs' with values 'Steel' and 'Aluminium'
4. Create a new sale order for any customer with product 'TEST' and
variant 'Steel' and confirm it
5. Open the form of product 'TEST', remove the attribute 'Legs' and add
the attribute 'Color' with values 'White' and 'Black'
6. Create a new sale order and try to add the product 'TEST', an error
is raised
Solution:
Exclude `product.template.attribute.value` from the ptavList only if it
is present in the ptavList
Problem:
If a product has an archived variant that uses the same attributes than
an existing active variants except one, we will try to exclude the
different attribute but because it has been archived, it is not present
and cannot be excluded.
opw-3420616
closesodoo/odoo#129012
X-original-commit: 907aba0f54f65788c78c1370a573fbe9b69be8c5
Signed-off-by: Guillaume Merlin (megu) <megu@odoo.com>