From the PoV of the customer, there is no difference between an
authorized payment and a captured payment; they should get redirected to
the confirmation page in both cases.
closesodoo/odoo#42780
X-original-commit: 452676737dd657a5d31a88fa89cc136cbe69b96a
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
This feature has been lost when removing the account.invoice model.
closesodoo/odoo#43060
--task: 2154792
X-original-commit: 7615030fb293356fc5540ba65afa66ff71b207c1
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
- In a multi currency company, create an invoice with the domestic
currency ($);
- Add a product (500$) with taxes;
- Change the currency to a foreign one (€);
- The product don't change of amount but only of currency (500€);
- Save the invoice, and print it.
Before this commit, the base_amount_tax of the tax wasn't be updated.
Note that the base_amount_tax it should be expressed in domestic
currency. As this field didn't update in this case, the base_amount_tax
is expressing the amount in foreign currency. As this amount is supposed
to be in domestic, for the sake of the reports, it's change in currency
of the invoice (in this case the foreign one), and it's shown in the
report. The amount shown is not correct.
Now, the base_amount_tax is recompute and setted in domestic currency.
opw-2157853
closesodoo/odoo#43071
X-original-commit: 226a1155124e890d00e33968feb43b9fd6b99fa5
Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
With this commit, we can now say "on preview/selection of a widget,
also preview/selection these other widgets". For this, add a
`data-trigger` with comma-separated widget names.
A `data-trigger-value` can also be used to indicate the values these
other widgets should have during preview/selection... but this currently
only works for colorpicker widgets thanks to a big big hack that should
be improved later.
Part of https://github.com/odoo/odoo/pull/42986closesodoo/odoo#42986
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
* website
This commit is simply about factorizing the code some more and making
sure the user value widgets always trigger a meaningful 'previewMode'
value.
Part of https://github.com/odoo/odoo/pull/42986
* website
This commit is simply about making the related method public instead of
private (allow to better see the diff in upcoming improvement commits).
Part of https://github.com/odoo/odoo/pull/42986
Instead of triggering three different events 'user_value_change',
'user_value_preview' and 'user_value_reset', user value widgets in the
left panel now trigger only one event: 'user_value_update' with a
'previewMode' parameter being false, true or 'reset'.
This allows to simplify the code.
Part of https://github.com/odoo/odoo/pull/42986
_log_next_activity was on stock.rule and should have been
@api.model. So it should rather be on product template but
it's probably not necessary to have a function for it since
it's only used by orderpoint process.
Create RFQ with an order by date in futur. It will allow to
discuss RFQ before validate them and to be in time for the need.
today Order by Sheduled date of receipt
|_______________|___________________|_____________________|
days to purchase vendor LT security days
Task: 1849912
When the scheduler runs, each orderpoint will check the forecast stock
for an infinite time. As example, if we plan a receipt of 10 products in
4 months and need to deliver 5 products next month, procurement will not
be launched since we have a forecasted quantity of 5.
In order to improve it, the orderpoint will compute the total lead days
from rules, suppliers/production delays, security days,...
Those lead days will be added to today in order to know at which date
the forecast stock should be checked and trigger the replenish document
for today in order to be delivered at the correct date.
Task: 1849912
Currently orderpoint run one request at a time. However it's not
efficient since compute are some private methods could be executed
one time in batch instead of record by record.
The strategy in order to improve it is:
- Still cut the orderpoints in batch of 1000 (usefull when using a new
cursor with intermediate commit)
- For each batch of 1000, create a list of procurement values and run
them in batch (commit a2a6b099a4 for more info)
- Each time a procurement exception is raised, catch the failing
orderpoint and rollback to the state before run. Remove the failing
order point from the current set and run it again.
- run method try to catch a maximum errors by continuing to process even it
finds error in order to stack them. It would avoid to run the same set
again and again each time an error is raised.
test_orderpoint_1 took 975s before this patch and 100s after.
Task: 1849912
Currently when a procurement fail it will raise a user error.
Some function as run in stock_rule catch the errors and merge
them in a single error.
Also since commit a2a6b099a4 procurements
are executed in batch and in some cases, we would like to have more
information about the error. For example in orderpoint we would like to
know which orderpoint is responssible for which error.
It would also be possible to return an object with the details but
procurements pass through a lot of different method that already have
their own return signature and a simple exception is easier to manage.
Task: 1849912
Orderpoint reference are only set on the first object that is created
from the procurement request. However sometimes we would like to access
it from further object or define another behavior if we come from an
orderpoint.
Now that the we propagate the orderpoint_id, it's important to ignore
po line with an orderpoint AND a chained stock move, else the quantities
will be counted twice by the orderpoint in a 2 steps receipt scenario
Task: 1849912
- lead_days: number of days to add from today in order to define the
procurement request date.
- lead_type purpose is to define if supplier delays should be added
to procurement request date.
Those fields are problematic with the onboarding. The purpose is to
replace them with an automatic computation.
Task 1849912
This will be use to make testing of the MiPyme FCE document types
closesodoo/odoo#43080
X-original-commit: 4365bd25512082bfd70229272c7248720f0383ca
Signed-off-by: Josse Colpaert <jco@openerp.com>
Before this commit, function _get_payment_type was declared twice in SaleOrder model.
closesodoo/odoo#43044
X-original-commit: 5eb55d04de4c945377cfb192291146e46b74e05e
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Using a lazy translator as this file is processed when loading the web
client, no during rendering (the translation memory was not ready yet).
Turn escFormat into a lazymethod to evaluate it only after translation
resolution.
Fixesodoo/odoo#36494
t push de#
closesodoo/odoo#43038
X-original-commit: 05429ca9d09ad49f5f214b082ef524b74c25eeeb
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
Before this commit, the breadcrumb was lost when user validates an
inventory adjustment. Now, it's not the case anymore.
fixes#41891closesodoo/odoo#43037
X-original-commit: b557f47f567182d5c529c131444c59d3315d2268
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Create an invoice, click on send and print without an associated
template.
Traceback will occur because the lang parameter is set correctly only
from a template. Adding a fallback in case there is no template setting
opw-2168623
closesodoo/odoo#43008
X-original-commit: 8fd8fdcf0fa6fb26a1797ad2b40fcaf34d23eee2
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Install stock, go to Configuration>Settings, activate "Storage
Locations". Go to Configuration>Locations select locations and print
The reported will not follow the documentation, barcode will be one
after the other and not side by side, arranged in a 2x2 grid.
Fixing require to apply style changes since new bootstrap
code is not handled well by wkhtmltopdf
opw-2162698
closesodoo/odoo#42967
X-original-commit: 7ac26d0ef5631cee38c29535531053fed6afce85
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
- Go Inventory > Master Data > Products
- Group by Category
- Go to a product
- Click on 'Update Inventory'
An error is raised because the field `categ_id` doesn't exist on
`stock.quant`.
opw-2161129
closesodoo/odoo#42964
X-original-commit: 901d60cd90f1e6ba0fd6502c04619193d3ca1c7b
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
Issue
- Install planning
- Go on a planning view where you have 2 filters (employee/roles)
- Unselect all items of one filter
All the filters disappear.
Cause
By doing this:
```
if (!_.find(options.filters, function (f) {return f.display == null || f.display;})) {
return;
}
```
We break the function's recursion:
```
return self._renderFiltersOneByOne(filterIndex + 1);
```
So the others filters are not rendered.
Solution
Return the next filter rendering instead of nothing.
OPW-2166932
closes#42703, closes#42433closesodoo/odoo#43025
X-original-commit: dbab68a92ec48b2bb6f21244af1de56691cb43f1
Signed-off-by: Jason Van Malder <jvm-odoo@users.noreply.github.com>
Commit 6c4447ef59 set a new domain on picking_type_id of stock rule but
it was wrongly written. This commit make it syntactically correct.
closesodoo/odoo#43009
Task: 2169836
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
Crm Lead has a quite complex form view as the same view is used for both
leads and opportunities. There are therefore some duplicated fields, such
as partner_id.
It is therefore complicated to use xpath to locate such fields. Adding a
name on groups containing those lead / opportunity specific fields make
the view easier to inherit using xpath.
closesodoo/odoo#42895
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Name field on mailing is a technical field coming from its underlying utm
source record, coming from an _inherits. It is not required in view as it
is computed at creation based on subject. Changing it is possible
in debug mode.
However it is possible to try to write a void value, which leads to an issue
as it is technically required. With this commit we make the name field required
at write.
closesodoo/odoo#42368
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
At model level, activity_type_id is not a mandatory field on mail.activity.
Indeed required is added in views, meaning people could have activities
without type.
This make the activity views crash with `TypeError: 'bool' object is not
subscriptable` error when computing aggregated activity data. This commit
fixes that error.
Activities without type are still not displayed in the activity view as
columns are based on available activity types. It means activities without
type have no column to be displayed. As this is a corner case that should
not happen when using activities using the interface this is considered
as a limitation of current implementation.
closesodoo/odoo#42991
X-original-commit: 77f0dd8936df3dddfa3df8041d4b7f7c62595430
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Currently an onchange on event type copy the mail schedulers information from
event type to the event. In order to ease inheritance, some white listed
attributes are directly copied using direct getter (line[attribute], see code
for clarity). However mail and sms templates are many2one fields and the
id should be copied, not the browse record.
There is no issue when the onchange is trigered from interface because a
mapping is done. However when calling the onchange in code there is a crash
as the record is directly given to write.
closesodoo/odoo#42990
X-original-commit: 09c6747ea2de108cf512091b7837a71d4ea4662a
Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
Impacted versions: 13.0
Steps to reproduce: Add employee, allocate paid leave, set leave in hours.
Standard workweek is set to 40 hours. 5 days 8h per day
Global Time off: Dec.25 00:00:00 - Dec.26 23:59:59
Employee requests one week of leave, during christmas (dec.25 and dec. 26 in the week).
Manager approves.
Current behavior:
Before approval the total hours in the request is 24. The manager approves
and the total hours change to 40. Total remaining hours is also -40.
Expected behavior:
After approval the requested hours should not change and remain 24. The
total remaining hours should also be -24.
This is a similar issue as issue #41848 which has been fixed in #42710
TaskID: 2169161
Closes#42877closesodoo/odoo#42924closesodoo/odoo#42983
Original-signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
X-original-commit: 11a5e3d09dd57d51813fc8151c30a619d4f368b5
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Purpose
=======
Impacted versions: 13.0
Steps to reproduce:
- Add employee
- allocate paid leave
- set leave in hours
- Employee working hours is
Mo: 8:30-12:30
Tu-Fr: 8:30-12:30 and 13:00-17:30 (total of 38h per week).
- Employee requests on week of leave
- Total hours in request is 38. Manager approves.
Current behavior:
Before approval the total hours in the request is 38. The manager
approves and the total hours change to 40. Total remaining hours is
also -40.
Expected behavior:
After approval the requested hours should not change and remain 38.
The total remaining hours should also be -38.
Taskid: 2166964
Closes: #41848
X-original-commit: b89565b93d8e6905d4cc3fe9d3de8ddecb43acd4
New component: the custom file input. Its purpose is to define a input of type file
with a custom trigger (button, link, etc.).
Its construction is the following:
- attributes: behaviour of the actual input (route to call, multifile, allowed
extensions etc.)
- inner template: the trigger that will fire the upload prompt when clicked
Once a file has been uploaded, the component will emit a 'uploaded' custom event
containing the files.
closesodoo/odoo#38423
Related: odoo/enterprise#6031
Signed-off-by: Géry Debongnie (ged) <ged@openerp.com>
New Owl component: Dialog. It does not rely on Bootstrap but behaves the same
and does not conflict with legacy dialogs.
To call this component, you need to define it in the XML parent template instead
of calling it in the JS file, and put a flag in the parent state to toggle the dialog.
Old dialog file has also been slightly updated to ensure compatibility between both
versions.
This commit also updates a list view test which did not wait for click events to
properly trigger and would cause the new dialog system to crash.
Added a new custom hooks: useFocusOnUpdate.
This hook returns a function taking a DOM selector as an argument.
That function will focus the first matching element on the next repaint of
the component.
Now use direclty the posted state from account move.
* This was changed in a constraint in l10n_latam_invoice_document module, also extend the constraint docstring
* This old states where also in a view domain in l10n_ar module for account.move view. We remove the field for the view (AFIP Responsibility) instead of fix the state name.
closesodoo/odoo#42982
X-original-commit: 33a5cfe068323f7fc4c92f42fadb8e236954d93a
Signed-off-by: Josse Colpaert <jco@openerp.com>
The purpose of this partner is that we do not need to report to AFIP the identification number.
Since this partner identification was configured as DNI it was throwing an error when validate an invoice for that partner in AFIP, AFIP was requesting us to sent the DNI number.
Now we activate the Sigd "Sin identificar/venta global diaria" identification type (code 99), proper configure the it to Anonymous Final Consumer partner, with this change AFIP validate the invoice directly and does not request us the identification number.
Now we set this partner sequence to the biggest one so far to show this identification type as the last in the list of identifications types
closesodoo/odoo#42981
X-original-commit: 842306b06984f4357f9e3cfdbb58bad828a1a627
Signed-off-by: Josse Colpaert <jco@openerp.com>