In 13.0, as of 369c20a9 there is some style that will show an event with
bigger font-size and spacing in calendar day view.
In this commit, if an event is short (less than 30 pixels, so less than
45 minutes) we will decrease the spacing to have the same as in week
view and see the event title more easily.
opw-2216654
closes#48391closesodoo/odoo#48409
X-original-commit: a4d170ad9e73d1d63404532b161911df020b5c36
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
After d3ddcc613f l10n_it_edi started to
fail its tests because not adapted, porting the code from the same commit
fix the issue
opw-2214185
closesodoo/odoo#48397
X-original-commit: 33e80333b84d71ae0f61d4ab0e3aa7fdfcdf0f78
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
When user apply half day leave in Leaves, the approver should be able to check
whether it's morning or afternoon on the approval page.
closesodoo/odoo#48429
X-original-commit: 3d3de2bf991bf4a10566599d3bb9011e4c09d21f
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Signed-off-by: Alex Tuyls <alt-odoo@users.noreply.github.com>
Simply create an SO with more than 1 Qty and deliver. An untaxed amount
is shown on the SO.
Check in Sales > Reporting > Sales > Pivot view, the Untaxed amount
Invoiced and Untaxed amount to invoice Measures. They show the right
amount.
Make a partial return from the original SO and validate.
Reduce the quantity on the sale order line.
The sales report is not updated with the right untaxed amount to
invoice. This occur because when the sale order line have an increased
qty_ordered a chain of event is triggered which included the
recomputation of the untaxed_amount_to_invoice which does not occur on
decrese.
Adding the product_uom_qty to recompute triggers fix the issue
opw-2213996
closesodoo/odoo#48282
X-original-commit: f8a5366ea650c1a2ac4ad3a42da7da4a34758d60
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This happened:
- The user clicks on a parallax snippet
- For each option, call onFocus then updateUI:
- The BG position is first, so update its UI
- The parallax option is last, onFocus changes the BG position target
... this is broken since the BG position option was updated before the
parallax one was able to change its target. So the BG position was
updated by checking the background type of the snippet instead of its
internal parallax <span/> element.
This was working in 13.0 as changing the target automatically re-updated
the related option UI, now this is left to the dev to update the UI
afterwards or not.
In this case the fix is simple: the onFocus of all options should be
called, before calling the updateUI of all options. This actually
allows to make the code cleaner.
closesodoo/odoo#48428
X-original-commit: 912e849207709b31aa11b7a2bec9ed8dd8b43203
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
It is possible to define required fields from the Authorize.net backend
without which no customer profile can be created. These fields include
data that Odoo sometimes does not have at all (fax number, anyone?);
however including the phone number is a meaningful option.
Before this commit, if the 'phone number' was required by the
Authorize.net configuration and was correctly set in Odoo, this still
did not work because we did not include the phone number with the
customer profile creation request payload.
We do now.
opw-2215332
closesodoo/odoo#48420
X-original-commit: 034c04efa4ccecd40f657eae97ef2b04934d570c
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
Steps to reproduce the bug:
- Let's consider a product P
- Let's consider that a draft SO has been created for P with analytic account AA
- P can be sold (sale_ok=True) and Re-invoicing policy = 'At cost'
- Untick the option 'Can be sold' on P
- Create an expense E for P with the analytic account AA
- Submit E and try to post the entries
Bug:
A UserError was raised saying that SO with analytic account AA must validated but
P is no more salable.
opw:2217773
closesodoo/odoo#48408
X-original-commit: 3db629cbcde9c4c3bbe2874c18e01dd31abe092d
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
The 'vendor bills' stat button on purchase order, once clicked, will
have a specific behavior depending on the invoice count :
0 : open a new invoice with pre filled fields (not saved yet)
1 : open the form view of the invoice
2+: open the list view of the invoices.
Before this commit, the invoice count was computed with an environment on
the current user. That means a record rule could make the invoice count
lower than the real count and so give an unwanted behavior. Ex: create a
new invoice even if there is already one created because the user cannot
see the other people's invoices.
After this commit, the action_view_invoice with make an explicit read()
in database to fill the cache with all the purchase order's invoices and
make sure the count is the real one.
Task : 2206969
closesodoo/odoo#48274
X-original-commit: e3101d92187946b2bd539e05956e4e83cd9c9097
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
This commit ensure the user have to minimum rights to post invoices
The 'Post' button was already hidden but the post() method is public
Task : 2206969
X-original-commit: 28ae3fb5366d61d3f5f9067cda962b047105199e
Before this patch, the purchase users get an access violation error
at the invoice creation from a purchase order. This was due to
some missing ACL between v12 and v13.
Task : 2206969
X-original-commit: 4c4fb33e4bbc78a85ad309baf5df906cf16566ea
When the value is the same for all records, the write can be done in
batch, this can lead to a "slight" performance improvement, depending on
write overrides, and how the value was computed for each line.
Correction of the position of the buttons when editing bg-image
position with a parallax effect other than "fixed".
task-46147
closesodoo/odoo#48419
X-original-commit: 0919b11c9a78a97345b42bf0fe0f1f9939c2b214
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
- before this commit the product was set to EXP_GEN
but nothing if EXP_GEN is not in db anymore
- now it will pick the first "expensable" product if EXP_GEN doesn't exist.
closesodoo/odoo#47678
X-original-commit: ee35c662768c6f27dff88e9c4597695c17b3b67b
Signed-off-by: Florian Daloze (fda) <fda@odoo.com>
Signed-off-by: Thomas Carlier <Explicitapps@users.noreply.github.com>
Handle missing barcode for 'pick components' and 'store after
manufacturing' picking types
closesodoo/odoo#47201
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Currently when the warehouse is created the picking type are created
with a fixed barcode that contains the warehouse code. Later, a
warehouse's code modification will not impact the barcode on the
picking type. However when a company is created the warehouse is
also created with a default code. It's easier to modify all the
barcodes when the code is modified rather than update picking type
one by one. We expect users to setup warehouse configuation before
starting to customise its components so it should not be problematic
but it implies that a late configuration could impact small
configuration on locations and picking types.
Usecase to reproduce:
- Create Warehouse with code A -> Picking type sequence start with A/
- Set the warehouse's code to B -> Picking type sequence remains A/
- Set the warehouse's code to C -> Picking type sequence become B/
It happens because _update_name_and_code is called before the write and
it updates the picking_type's sequence with warehouse current name and
code.
Before this commit, trying to use Odoo as a library without initializing
the logging features would result in a crash because `Logger.runbot()`
is monkey-patched inside the function `init_logger()`, which is de facto
necessary for using Odoo as a lib.
With this commit, we do the monkey-patch at the module-level so whenever
the `netsvc` package is imported the patch is applied, which should be
well before the loading of the registry starts.
closesodoo/odoo#48396
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
In gallery snippet in carousel mode, fix the fact that the height of
the controls are bigger that the others squares and fix also the wrong
position of the indicators.
task-2162952
closesodoo/odoo#48380
X-original-commit: 9752596abfcae6b0bbf79ac675fe9e304a068a21
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
As the container class now changes with the width option. We cannot use
this class in the js or css files anymore.
task-2162952
closesodoo/odoo#48377
X-original-commit: 1cf2ee35c2d85d87b27d5bd72c414e12fcbaf123
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Before this commit, There would be a crash if the user tries to remove `website_company_id` from Website configuration as It is used in Backend.
With this commit, we make `website_company_id` required if the Website is set.
Fixes#47967closesodoo/odoo#48175
X-original-commit: 940cc76ef3f301df91b60353e48cbaa5217bea93
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
While you edit an account move line
you only want to see the account
that belong to the company of the move
The record rules on account.account
lets the user see the account
of all the company selected.
It too much when you want to select an account
on a move.
Solution:
Add a domain in the account.move form view
closesodoo/odoo#46197
X-original-commit: e0aeb878eed266810862ffb2efc7c03f51389c8f
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Steps to reproduce the bug:
- Let's consider an attribute A with two values V1 and V2
- Let's consider a product P with V1 and V2 as attributes
- Duplicate A
Bug:
P was associated with 4 attributes V1, V1, V2 and V2
opw:2219540
closesodoo/odoo#48342
X-original-commit: 1c44aeb7d1734cd7a6dbdb80971f98553c67003b
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
When we print a report for multiple records, we call wkhtmltopdf one
time and to save each document separately, we will split the PDF based
on its outline if it is available.
The outline is generated by wkhtmltopdf based on headings
(H1,H2,H3,H4,H5,H6,H7,H8,H9 elements) for example this document:
```
<h1>hello</h1>
<h2>world</h2>
<h1>!</h1>
```
has this abbreviated outline structure:
```
/Outlines: {
'/First': {
'/Title': 'hello'
'/First': {
'/Title': 'world'
},
'/Next': {
'/Title': '!'
}
}
}
```
But the current heuristic did not take into account level of headings,
so if the document had a lower-level headings this could break the
multi-printing of these reports.
So for the example above, the document would be cut in 3 when in reality
we only want to cut it twice over the top level heading (`<h1/>` here).
An existing issue in Odoo is in l10n_in_sale, `<h6/>` element are added
to the report invoice line so instead of only one `<h2/>` heading
containing the invoice name per document, there was an additional
heading per invoice line which broke the heuristic.
note: we also add an assertion to ensure first heading is on first page.
note: allowing several top-level heading on same page has been
implemented so reports that did not work in 11.0 but worked in 12.0 and
over (thanks to 573e57773) still work after this change.
opw-2188767
closes#48099closesodoo/odoo#48374
X-original-commit: 63c2478cc9fb21afb83d31b04ff6c6090ee492ab
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
In 12.0 9de1bc0e aria-label translation was added for python views, but:
- aria-label attribute are not exported
- aria-label are not translated for JS view rendering
So by default, aria-label would only be translated for python views that
had the same aria-label term in a translatable element (eg. "title"
attribute).
opw-2222504
closes#48255closesodoo/odoo#48275
X-original-commit: 6b6b11ea2f8391f1f195bd1650531f77b6bed729
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
When you create a invoice from a sale_order
the account was taken from the journal and
it should comes from the product
or the product_categories and in last resort the journal
and finally fiscal position should have been apply.
It was not the case anymore,
because setting the partner_id prior the account_id
trigger the default_get on the account_id which
in that case take the wrong value
closesodoo/odoo#47267
Solution: set first the account_id then the partner_id
X-original-commit: 857564367691f3f11572f718499c9d22c823c421
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
Some menus contain items that are selected/checked when they're
activated, e.g. when a filter is applied, the menu item corresponding to
that filter is checked. However, that information of what items are
checked and what don't, is not reported correctly using aria attributes.
To solve the above, the following is performed:
- Attribute `aria-checked` is set accordingly, usually using the same
logic as the clas `selected`
- Attribute `role` is set to `menuitemcheckbox` or `menuitemradio`
instead of `menuitem`, so `aria-checked` is applicable
This applies on the following cases:
- Standard topbar's menus: Filter, Group by and Favorites
- The company switcher widget
closesodoo/odoo#48301
X-original-commit: 64c0b47c0e8e8fdd3fa9b1bc13f2b49b6f49f4e1
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Purpose of this commit is to let computed stored editable fields being
copied if their field class allows it.
Indeed the value of those fields is computed based on some triggers but
can also be updated manually by users. When copying a record, it makes
sense to consider that this value is what the user expects and allow its
copy, if the original field allows it. Either it was computed, and
copied value will be correct without having to call computation again
(well, provided all dependencies have been copied, too), or it was
updated and the copied value will be the one the user entered.
Without this fix, an edited field is not copied, and will be recomputed,
which may look like an inconsistent value.
Task ID 2209163
closesodoo/odoo#48383
X-original-commit: 4b274d3b4101fbae154a572cdf40d23838899773
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Co-authored-by: Raphael Collet <rco@odoo.com>
Currently, when updating a review on a course, the feedback field is not
updated on the rating model. Therefore, the backend view for rating is
always displaying the first feedback posted
Task ID 2184038
closesodoo/odoo#48382
X-original-commit: f2d04753be9f1feb75e575b0598b3520caa4744d
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Finetuning of
https://github.com/odoo/odoo/commit/b30e280b2d676f16873ac0fd1279c4870d994dec
:
self.user_id is always an empty recordset in a default function call,
use self.env.user instead, it is the default value for user_id.
The _init_column override is needed to ensure the new property field on
res_users isn't read at module installation, because its ir.model.fields
doesn't exist already, leading to a wrong sql query in ir_property.
closesodoo/odoo#48378
X-original-commit: 6c6bd018c761535f973781319090116d7eea60ad
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Issue
- Go on Runbot V13
- eLearning
- In a course, try to delete a question
You can't
Cause
The linked answer is not deleted
If you want to delete the answer you should
add an extra menu
Solution
Add ondelete='cascade' on answer's question_id
Prevent course deletion if there are attendees
OPW-2210096
closesodoo/odoo#48372
X-original-commit: 799ee72facbca7a7eaf348938ed312a6d723854e
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Before this commit, the `kanban_state` field on the form view was not
positioned correctly in community edition, making it impossible to read
possible values. This commit fixes that by ensuring it is on the right.
Due to some CSS differences enterprise was not affected.
Fixes#38567closesodoo/odoo#48370
X-original-commit: 2f89951a17762c05e17a247fa795e9f96703018d
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Currently there are several limitations in visitor email and phone
computation, notably phone of partner is not taken into account (only mobile)
and computation does not work in website_crm if there are no leads.
In this commit we
* support both mobile and phone fields of partner. Indeed generally all
SMS flows check for those two fields and not only for mobile;
* replace the SQL by standard ORM computation. As those fields are not stored
and displayed in list views ORM should be capable of managing them;
* avoid crash when creating visitors through the UI (no ids -> don't go
into raw SQL);
* correctly keep partner-based values when no lead is linked to the visitor;
Tests are also added in order to ensure behavior.
Task ID 2196869
closesodoo/odoo#48369
X-original-commit: 02ceb42e204be2b40b334b4e554eef6dfaffd228
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Message post with template has to be called with a notif_layout parameter in
order to have a layouting correctly set through the call chain.
closesodoo/odoo#48359
X-original-commit: 077f58027e29a50cd9a9bf455b5ca5c482503686
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Keep the same images order as the other modes in the gallery snippet
with masonry mode. Before this commit, the images order was reversed
with masonry mode.
task-2162952
closesodoo/odoo#44486
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
Purpose of the task is, when the accrual is selected, the field for
duration is hidden but the feature allows to use it.
So in this commit,when accrual is selected, display number of days
(duration) to provide an intial allocation while accrual is selected.
Also change label and tooltip according to allocation type.
closes odoo/odoo#48354
Taskid: 2199324
Closes: #47598
X-original-commit: 74df5cbaf37d3cc6da0b15efa9d7f4a4ec265ec5
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
in helpers 'get_odoo_server_url()' return the server string or False.
In steps by steps config wizard we display this value.
So in server input it display 'False' and with this value we can't submit the form
Now we set a empty string if the return is 'False'
closesodoo/odoo#48346
X-original-commit: 57283f213ee3d1dd4f59c83cc34fbdd3545c4533
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
- Create and validate an invoice in a date (near the end of the fiscal
year for example: 20.12.2019) in a foreign currency;
- Pays the invoice in a different date (23.12.2019), the invoice is
settled and a currency exchange is created;
- In the new fiscal year (for example: 03.01.2020), amends the invoice
(a description change for instance): cancel the invoice, change the
invoice into draft, made the amends, re-validate the invoice and
re-settle the invoice (a new currency exchange reversal is created).
Before this commit, when cancelling the invoice, a currency exchange
reversal is created at the current date (03.01.2020) to revert the first
currency exchange reversal. When the invoice is re-settle, a new
currency exchange is created a date of the payment (23.12.2019).
This means that, in the fiscal year of 2019 two currency exchanges were
created, and in the new fiscal year of 2020 a currency exchange revert
is created. To avoid this erroneous situation, the date of a currency
exchange reversal should be the creation date of the currency exchange.
Now the currency exchange reversal entries has the same date as the
initial currency exchange entry.
opw-2209675
closesodoo/odoo#48344
X-original-commit: cedfbd0379a907650db9b23f6c5203522d4ced95
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
If we start a self flash and we refresh the page
we are able to start again the upgrade.
So now we check if a upgrade is not already started
closesodoo/odoo#48340
X-original-commit: 7189111a73b689af919cdfa4712f04108b7931e6
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
A commit merged very recently added 1 more base query to both users, but because
the count of that particular test is non deterministic, the issue is only
spotted later on runbot, and it has to be fixed now.
closesodoo/odoo#48331
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
Steps to reproduce the bug:
- Lets consider two companies C1 in € and C2 in $
- Let's consider two customer invoices I1 in C1 and I2 in C2
- Select these two invoices in the list view of invoies and print it
Bug:
A traceback was raised because the function _convert expects a singleton
opw:2222140
closesodoo/odoo#48323
X-original-commit: b66bcfe96dfdc62a1faa26ccf9c6adfa2b8929a4
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Before this commit the demo delivery WH/OUT/0005 is plan then validated.
But as this delivery is the one used as example in the barcode PDF, it
could be usefull for demonstration to keep it as to process.
So, this commit keeps it only as ready, and also increases the stock
amount of Desk Combination to be able to process this delivery without
any issue.
task-2199747
closesodoo/odoo#48320
X-original-commit: 652ee46e8adc35bae4f89bf9802f12bd1c424c8d
Related: odoo/enterprise#9474
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
As a barcode for this location was created into the barcode pdf
(enterprise), it seems logical this location has actually a barcode.
task-2199747
X-original-commit: 661bfffca9ad2aa1357ef031ca983104200d5d1f
Issue
- Be in multicompany
- Have a company with a long name
- Install Accounting
- Settings > Currencies > Dollars
- Click on the smart button "Rates"
- Group by company
Company name and rate overlap
Cause
In `_computeDefaultWidths`, we use the method
`_getColumnWidth` which returns a width depending on the
field type.
When you use group by, the fields order doesn't change
so the company name in the group line have the width
of the date field (92px) and there is nothing that
limits the place that the string can takes so there
is overflow.
Solution
As it seems to be something very accurate, I think the
safest solution would be to use the `o-text-overflow`
saas mixin.
OPW-2218143
closesodoo/odoo#48318
X-original-commit: 2898dd4577e12326cbe83dce9fdbdef0e32d51e6
Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>