When an accrual leave is allocated to an employee,
it starts from the employee creation date.
However, companies want to create employees before they start working.
Therefore, they want to be able to change the accrual leave allocation start
to when the employee starts working.
For instance, when hr_contract is installed, we can change the
accrual leave allocation start to the date when the first contract starts.
We create the function _get_date_start_work(),
that can be overriden to allow those changes.
OPW-1939378
closesodoo/odoo#31930
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
When there are multiple warehouses, the shipping address must appear on
the purchase order and the RFQ.
opw-1955874
closesodoo/odoo#32230
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
When making a poll, an event is registered on each channel. Once
a notification is sent on a channel, only the events of the
notified channel are removed. A pointer to the event is kept
in all other channel the user subscribes to until those channel
are notified.
Since a user usually has many mail.channels but only a few active ones,
a new event and a bunch of pointers are created at each poll and
never removed.
This fix simply remove the pointers to the current event at the
end of a poll.
closesodoo/odoo#31215
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
Steps to reproduce the bug:
- Activate multi currencies on your user
- Let's consider currency A and currency B and currency A is the one set on your company
- Create a customer invoice I with currency B
- Go on the tree view of customer invoices and select I
- Click on "Action" and select "Generate an invoice"
- On the wizard, clear the currency B
Bug: A traceback was raised because the function amount_to_text requires a currency.
opw:1958888
closesodoo/odoo#32202
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Steps to reproduce the bug:
- Create a BOM for product P
- Generate variants for P: P1 and P2
- Go to BOM of P and click on Structure & Cost
- Change the current variant to P2
- Click on "Print"
Bug:
A traceback was raised because the function _get_bom expects in arguments that
product_id is an id and not a recordset.
opw:1950401
closesodoo/odoo#32128
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
- Create a new Sale journal
- From the accounting dashboard, click on the name of the journal
created
Invoices from all sale journals are shown.
The filtering performed is not sufficient: it should filter by journal.
opw-1958446
closesodoo/odoo#32166
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
The delivery lines (move_lines) have two way to be displayed in a view:
- with move_lines (all move line of a stock.picking)
- with move_ids_without_package (same but removing packages)
But so if we write directly on move_ids_without_package we would not
trigger the stock.picking @api.depends('move_lines') _cal_weight method
thus the picking weight was not updated in some instances.
With this changeset, we adds the move_ids_without_package as depends so
on move_ids_without_package onchange the total weight should be set to
the correct weight or 0 (if move_lines is not in the view) and on write
the correct weight should be computed.
opw-1959523
closes#32157
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Steps to reproduce:
- Install Accounting and Sale
- Enable the developer mode.
- Go to Settings > Users & Comp > Your user, edit to check both "Tax
Display B2B" and "Tax Display B2C" boxes.
- Go to Settings > General Settings > Accounting > Reporting, check the
"Add totals below sections" box.
- Create a sale order in the sale module, the sale order must have at
least one section with several products.
- Print the sale order. The subtotal amounts are wrong.
There are two different subtotals amount to compute, one for the
*Amount* column and one for the *Total Price*. The actual computation
did not store the two amount in different variables. Multiple template
are broken in the same way.
Fine tunning of 716ff76
Co-authored-by: Nans Lefevre <len@odoo.com>
opw-1950833
closesodoo/odoo#32148
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
Having two move lines to reconcile.
The debit one with a past date.
The credit one with a future date.
Have a write-off in the same account as the move lines.
Before this commit, the function that creates the write-off move lines
(_create_writeoff) returns two move lines (the write-off move line itself
and the balance move line) normally only the balance move line should be
returned. Because of this, the reconciliation is not done correctly:
the credit move line is reconciled with the write-off and the balance
line. And the debit move line is not reconciled.
Now, the function _create_writeoff returns only the balance line so the
debit move line, the credit move line and the balance line are totally
reconciled.
opw-1924973
closesodoo/odoo#32055
Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
Allowing to override the _get_rendering_context and call the new
function (_get_rendreing_context_model) with a different custom model
to render the html.
opw-1946792
closesodoo/odoo#32101
Signed-off-by: Jorge Pinna Puissant (jpp) <jpp@odoo.com>
Before this PR quite a lot of the lines on the fiscal positions
"EU landen", "Niet-EU landen" and "Installatie en Afstandsverkopen"
where mapped wrong, some of the lines even referred to another
tax percentage.
Changes:
- The tax "BTW te vorderen laag (inkopen) 9%" on the product
mapped to the tax to apply named "Inkopen import buiten EU laag 6%",
which should be "Inkopen import buiten EU laag 9%" to correctly
counterpart the taxes. All the other changes where similar,
either invalid tax rates where applied or it mapped to a wrong category.
- "Verkopen/omzet overig diensten" on the product would map to
"Installatie/afstandsverkopen buiten EU" as the VAT to apply.
This should map to "Verkopen export buiten EU".
- Added 3 accounts for Omzet NL handelsgoederen 1,
Omzet NL handelsgoederen 2 and Omzet NL handelsgoederen 3
- Mapped the 3 accounts to the fiscal position
"Installatie en Afstandsverkopen" their relevant lines.
- Removed purchase taxes from fiscal position "Installatie en Afstandsverkopen" .
- Mapped the right taxes to the three fiscal positions their VAT tabels.
- Updated .pot file to add the three extra accounts.
Closes#31403closesodoo/odoo#32130
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
When the pdf of a vendor bill is sent to the alias of a journal,
all the partners that match one of the email address present in the mail thread
are added as followers of the newly created record.
This is a problem since the vendors are actually not concerned by the internal
work that is done, only internal users are.
As a result they get spammed by useless emails, and complain to Christine.
It was put in commit a4df9f8c93 despite not appearing in the task description.
We filter the partners to only keep the ones that belong to internal users.
opw 1958729
closesodoo/odoo#32110
Signed-off-by: Nans Lefebvre (len) <len@odoo.com>
- Activate multiple UoM
- Create a Repair Order
- Add a repair line ('Parts') of type 'Add', change the UoM
=> the unit price is not modified
- Add a repair fee ('Operations'), change the UoM
=> the unit price is not modified
The UoM is never taken into account.
opw-1953752
closesodoo/odoo#32127
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
When creating an invoice programmatically, make sure to retrieve the
`currency_id` field set by `_onchange_partner_id`.
opw-1951314
closesodoo/odoo#32097
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
When creating several attribute lines for the same attribute, the function _update_product_template_attribute_values
in model 'product.template.attribute.line' only kept the product.template.attribute.value records of the last
created line. So it generated issues with the product configurator because no value was founded for certain attribute line
in function _get_possible_combinations defined in model 'product.template'.
Now it's forbidden to create several attribute lines for the same attribute.
opw:1950786
closesodoo/odoo#32086
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
- Process a WO (e.g. 'Manual Assembly' from the demo data)
- Create a scrap for component 'Drawer Black'
- A new wizard appears:
'The product XXX is not available in sufficient quantity'
- Click on 'Discard'
A scrap is created in draft, but it cannot be canceled.
The scrap shouldn't have been created in a first place, but this cannot
be changed in stable. Therefore, we delete it.
opw-1946254
closesodoo/odoo#32122
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Do a MISC operation representing a payment
revert it
Do a statement line for that amount
Click on "reconcile" on the bank journal
Before this commit there was a Division By Zero traceback
This was because the bank account line had a zero amount_residual
due to its reversion
while the statement line was negative.
After this commit, for liquidity lines, we take the total amount instead of the residual
Because a reverted payment line can always be associated with a statement
OPW 1947362
courtesy of @smetl (las@odoo.com) for the fix
closesodoo/odoo#32105
Signed-off-by: Lucas Perais (lpe) <lpe@odoo.com>
Set the currency of the supplier info according to the currency set on
the partner.
opw-1951314
closesodoo/odoo#32098
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
moment().locale('en').format('YYYY-MM-DD')
"2019-03-25"
moment().locale('ar').format('YYYY-MM-DD')
"٢٠١٩-٠٣-٢٥"
moment().locale('my').format('YYYY-MM-DD')
"၂၀၁၉-၀၃-၂၅"
Was rejected as a valid bug at moment/moment#4448
Apply the same logic than 109b319d64Fixesodoo/odoo#32081closesodoo/odoo#32102
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Onchange to show only the states of an especific country in
opportunities.
Closes#31993
opw-1958170
closesodoo/odoo#32099
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
When displaying product template list in kanban mode, all the variants
of the product template are loaded but aren't used at all. This causes a
perf issue when loaded product templates have a lot of variants.
This commit removes the field `product_variant_ids` from view
`product_template_kanban_view` to avoid that perf issue.
opw 1951369
closesodoo/odoo#32048
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
This reverts commit 5324284f56
This reverts commit ad826f56ba.
If for example we had in a template:
<script type="text/javascript" src="/payment_stripe/static/src/js/stripe.js"></script>
it has been reproduced to be gotten as:
<script type="text/javascript" src="/de_DE/payment_stripe/static/src/js/stripe.js"></script>
which is unexpected and could cause an error.
closes#32090
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
The field `has_tracking` should be read-only, there is no reason to make
it writeable.
opw-1958266
closesodoo/odoo#32080
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
With 953a693df when a route is not found we assume it is a website.page
that can be multilang.
But with #31792 we should once again prefix URL by the language if
necessary.
The combination of the two cause issue when an url like `/web#home` is
tested since we do not take `#` into account, we check if the route is
multilang but no route `/web#home` is found => so we get
`/fr_FR/web#home`.
With this fix, `#fragment` is not taken into account when searching
route.
related to #31792
related to opw-1922051
closes#32059
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
In 10.0 and before, if we were eg. on website page /fr_FR/contact, if
`fr_FR` language (french) is installed and not the default website
language we would have all URL towards translated content (route with
multilang=True) prefixed with /fr_FR/ (the language code).
With 9cd982bcc some improvments were done to CDN but this also breaks
language prefixing, so this cause an unecessary redirect:
- we are on /fr_FR/contact and click on "Shop"
- we go to /shop
- odoo redirects US /fr_FR/shop
With this PR, URLs are prefixed with language once again.
note: the added test is hackish but the function tested depends on a lot
of odoo.http things that are hard to use for test (request.render,
request.context, request.httpreqest).
opw-1922051
closes#31792
Signed-off-by: Christophe Simonis <chs@odoo.com>
- Create 2 `crm.lead`:
Expected Revenue: 100; Probability: 99 %
Expected Revenue: 200; Probability: 0 %
- Go to Reporting > Sales Channels
The amount displayed next to 'Open Opportunities' is 148.5 is instead of
99.
opw-1947975
closesodoo/odoo#32011
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
The price comparison can be incorrect because of float representation
differences. We make the template more robust against this problem.
opw-1945541
closesodoo/odoo#32012
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
The picking barcode must be displayed in the batch picking report like in 11.0
opw:1958092
closesodoo/odoo#32004
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Complete cd4080839f
<span class="fa fa-globe" title="Title stuff"/>
is not correctly extracted but
<span class="fa fa-globe" title=""/>
was also extracted while there is no content
Check the size of the content too
Similar content is present on odoo.com website and should not be translatable
on Transifex
closesodoo/odoo#32018
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>