Commit Graph
134076 Commits
Author SHA1 Message Date
Jeremy Kersten e6997dae2b [FIX] website_blog: avoid loop of redirect if no trailing / in tag
Before this commit in case you start on blog with url like /blog/blog-1/tag/2,
you should be redirected to /blog/blog-1/tag/website-2 to avoid duplicate
content.

But because the replace was done with /tag/%s/ it will be not replaced and so
you are redirected to the same url, creating a loop.

closes odoo/odoo#45927

X-original-commit: 666306326cecc6ac8587b45d2dbf24c0463b33a5
Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2020-02-21 12:30:15 +00:00
Jeremy Kersten 01028b1cf3 [FIX] website_blog: avoid traceback if tag has been deleted
Before this commit, if you have a link with a tag that doesn't exists anymore,
you will have a traceback because you try to access to a unexisting record.

odoo.exceptions.MissingError:
('Record does not exist or has been deleted.\n\n(Records: [3], User: 2)', None)

Now, we filter on existing tag before to access a field.

X-original-commit: 54b45e5c287138a87a0b04ce4f301ea6893b9223
2020-02-21 12:30:15 +00:00
Jeremy Kersten d020dd89b5 [FIX] website_blog: simplify call to s_latest_posts
Common part of the domain is automatically appended by controller now.

X-original-commit: 38058cc6642b36195329e03ca187bd7d4366914d
2020-02-21 12:30:14 +00:00
jerome hanke (jhk) 8b63f15e27 [FIX] calendar: recurring events can have 0 repetitions
Steps to reproduce:
- install calendar
- create a recurring event with 0 repetitions
- save

Previous behavior:
raises an UserError, this would interrupt the sync with google calendar
Google calendar sometimes sets recurring events to 0 repetitions
once they are done recurring

Current behavior:
the event is handled like a punctual event but remains recurrent

initial commit: https://github.com/odoo/odoo/commit/ba727e15d2dc9a1325cd20527e2ccfe6f8bc63f0
opw-2185699

closes odoo/odoo#45947

X-original-commit: 5b63ddb4e03f34f015e7668c69108fb4a2badd08
Signed-off-by: mightyjol <jhk-odoo@users.noreply.github.com>
2020-02-21 13:49:06 +00:00
Christophe Monniez 952c668b82 [FIX] account, l10n_latam_invoice_document: fix move_type typo
Two typos were introduced with d675dbaa4c.

closes odoo/odoo#45926

Signed-off-by: Laurent Smet <smetl@users.noreply.github.com>
2020-02-21 12:18:32 +00:00
Denis Ledoux c59aefb783 [FIX] doc: backend, internationalization, renamed menus
closes odoo/odoo#45946

X-original-commit: 08df477c819aab1c91b04fada285ae1aae340800
Signed-off-by: Denis Ledoux (dle) <dle@odoo.com>
2020-02-21 13:42:11 +00:00
lejeune quentin 4756e6694a [FIX] point_of_sale: remove hw_blabox_be from odoo in init.d
Since PR 45225 hw_blackbox_be is no longer a module in the IOT but a driver.
It should therefore no longer be executed

closes odoo/odoo#45924

X-original-commit: acf11a68d17f300de3cc03cc53aa1cbac2f1977a
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2020-02-21 12:01:22 +00:00
yhu-odoo 839e14ee09 [FIX] stock: don't assign immediate transfer in comfirm
Missing part of #44947 of task 2160847

closes odoo/odoo#45922

X-original-commit: 367d236a974b1b726a770e58a03344a3d83fa49f
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-02-21 11:53:21 +00:00
574d7f0d4c [IMP] core: import-compatible export of m2m fields
When performing an import-compatible export, m2m values would be
exported as a record per cell unless the `id` subfield was the first
to be exported. Which is not the case when using the export UI (as it
always adds the field itself before any subfield). This would make the
m2m not actually export-compatible in most cases.

* export m2m "display name" in an import compatible format as well
* re-prioritise exporting xids when there are multiple m2m exports in
  import-compatible mode
* never fall back on the o2m / non-import-compatible m2m path for m2ms
  in import-compatible mode

Note: if multiple m2m fields are specified only one of them gets filled.

Task 2065428

closes odoo/odoo#37407

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
Co-authored-by: Ravi Singh <ras@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
Co-authored-by: Xavier Morel <xmo@odoo.com>
2020-02-21 12:12:19 +00:00
Michael Mattiello (mcm) 3ecea2c934 [FIX] web_tour: listen on date range picker event
When applying the selected date range using the widget the
tip wasn't consumed. This commit fixes it by listening on the
event triggered when clicking on button apply.

closes odoo/odoo#45916

X-original-commit: 150d69f70a505efa298c66119eced29d8caa3699
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-02-21 11:21:03 +00:00
Victor Feyens cfabde8386 [IMP] stock: batch creation of company default locations
closes odoo/odoo#45907

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-02-21 10:25:00 +00:00
Krupal Oza 3a02f08960 [IMP] crm, event(_sale), gamification: avoid long labels in embedded tree views
PURPOSE

In various views, the min width of some columns is too short for the label of
the field. This task aims at fixing this by increasing some minimal widths
and relabeling some fields.

SPECIFICATIONS

crm
  * in view_crm_lead2opportunity_partner_mass, view_crm_lead2opportunity_partner
    add date widget on create_date and remove the phone field in the inline
    treeview of opportunity_ids;

event
  * in view_event_form set width of boolean field 'done' to 70px and in
    view_event_mail_tree set string of field 'mail_sent' to 'Sent'
  * in view_event_form_inherit_ticket set string of fields seats_max to
    'Maximum', seats_reserved to 'Reserved', seats_unconfirmed to 'Unconfirmed'
    and set width '100px' in the inline treeview of event_ticket_ids;

gamification
  * in challenge_line_list_view and challenge_form_view set string of field
    'target_goal' to 'Target' in the tree view and inline treeview of line_ids

LINKS

Task ID 2166865
PR #43401

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-02-21 09:45:56 +00:00
Loan (lse)andNicolas Lempereur 7ceba92511 [FIX] website_blog: handle None window selection
In the code for commenting or posting to twitter a selected range of
text, we did not take into account the case of no selection (eg. we
click on an element, but another code prevent default browser action).

opw-2197227

closes odoo/odoo#45883

X-original-commit: c578279dba4a3fd95e261d8dc58f2704c3b50eb0
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Co-authored-by: Nicolas Lempereur <nle@odoo.com>
2020-02-20 20:12:17 +00:00
Toufik Ben Jaa 5ab518ce67 [FIX] mail: referenced before assignment error
- In some cases when trying to open a discuss conversation a
    traceback can occur because of the usage of a local variable
    before its assignation.

closes odoo/odoo#45867

X-original-commit: 47bec812a36c1e41bdb525439dfd18a208e1dd79
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
2020-02-20 17:26:35 +00:00
Thibault Francois 8c1c7f2687 [FIX] mail: Don't create duplicate mail.notification
When more than one user are linked to the same res.partner and this user is assigned to a task or a sale.order
as many email notifications will be created as there are users linked to the same res.partner.
This won't send more than 1 email, but multiple mail.notification
records will be created.
This causes duplicate entries in the mail.notification table, and can
crash when an old unique constraint is still present in that table (from
earlier Odoo versions)

To prevent this, we deduplicate the notifications and order by notification
type to get 'email' first in case the user have different notification
type ('email', 'inbox').

How to reproduce:
   - Create a first user test1
   - Create a second user test2
   - Merge the contact test1 and test2
   - Create a customer customer
   - Set the user test1 as salesman
   - Create a new sale.order with customer as partner

Add a test to reproduce the pathological scenario

Solution
  add distinct on partner.id and order by partner.id,
users.notification_type

closes odoo/odoo#45386

X-original-commit: 00f36c60e4790c8f5341cbc4f2c67e22e6d68f87
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
2020-02-14 10:40:57 +00:00
Harpritsinh SisodiyaandMohammed Shekha 7639f7fbcb [IMP] web_editor: check resource is custom or not to display warning on editor
adds _isCustomResource method which will check whether resource is custom or
not, this method checks for JS and SCSS resource, if resource is custom then
do not show "No Update" warning inside ace editor.

task-2167570

closes odoo/odoo#44536

Related: odoo/enterprise#8368
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
Co-authored-by: Mohammed Shekha <msh@odoo.com>
2020-02-21 08:34:24 +00:00
jerome hanke (jhk) 0c4d808fd7 [FIX] delivery: handle multiple references in delivery email
Steps to reproduce:
- install sales and easypost shipping
- have a delivery order of multiple packages with easypost
- click "send confirmation email"

previous behavior:
the template does not handle multiple package references
and the associated link is wrong

current behavior:
each reference is set in a separated link

opw-2167037

closes odoo/odoo#45507

X-original-commit: 65eaa3e7daf0b547ae2bb98e335fc5941cb200a6
Signed-off-by: mightyjol <jhk-odoo@users.noreply.github.com>
2020-02-17 13:39:48 +00:00
Nicolas Martinelli bef4a3bad6 [FIX] stock_landed_costs: multi-currency
- Activate 2 currencies
- Create a landed cost product
- Create a Vendor Bill in a currency different from the company currency
- Add the landed cost product
- Click on 'Create Landed Costs'

The landed cost is created in the company currency, but with the amounts
in the vendor bill currency.

This happens because the currency conversion is missing.

opw-2200500

closes odoo/odoo#45861

X-original-commit: 41f52aef54ddf9ab4cd0f23c1224c2d7581a1ede
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-20 16:57:31 +00:00
xmo-odoo 44aa17cc46 [REV] re-enable the multiple calls of initialize_sys_path
Some of the implicit side-effects got missed, namely that under some conditions
(e.g. using an odoo subcommand) `initialize_sys_path` can be called before the
config has been loaded at all, resulting in the first call not properly setting
up things, and one of the subsequent calls fixing things up.

Since this breaks workflows right now, quickly fix it, we'll re-investigate
how to fixup the entire thing in order to restrict & enforce a single call.

closes odoo/odoo#45844

X-original-commit: 6cb4c829e1559bcf836e4b573051760565b7d0c1
Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2020-02-20 15:45:42 +00:00
Nicolas Martinelli 9b95bb7904 [FIX] stock: immediate transfer in multi-step
- Activate multi-step routes
- Set Incoming Shipments: Receive goods in input, then quality and then
  stock (3 steps)
- Create an Immediate Transfer from 'WH/Input' to 'WH/Quality Control'
- Add 2 products, set a quantity
- Validate

Two immediate transfers are created, one for each product, while a
single planned transfer is expected.

This is because the `default_immediate_transfer`i key is polluting the
context.

opw-2180556
opw-2197720

closes odoo/odoo#45843

X-original-commit: 74ad073fd66ca4ff345aaf37a7245a8b93808cb3
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-20 15:44:28 +00:00
Romain Derie 3d3e8f3187 [FIX] website_event_track: add space between icon and date
Line return will add a space between icon & text, as it is done for the one
just above and the one below.

closes odoo/odoo#45875

X-original-commit: c26db3344b1e62158c4a3aa0c457802ea2376c63
Signed-off-by: Romain Derie <rdeodoo@users.noreply.github.com>
2020-02-20 18:42:04 +00:00
Christophe Monniez 253d5341a4 [FIX] tests: remove memory limit for chrome headless
Since Chrome version 80, the V8 javascript engine is using an new
pointer compression feature [1]. This features tries to reserve more the
4GiB of memory. As a consequence, during HttpCase tests, odoo tries to
launch chrome headless in a subprocess but fails because of the
memory-limit-soft.

With this commit, the Chrome browser is spawned in a forked process
that removes the memory limit.

Also a new Chrome CLI switch is used to prevent crash reports to be sent
to google.

[1] https://v8.dev/blog/v8-release-80

closes odoo/odoo#45859

X-original-commit: 726d9c50720c2d3c9e617e998ed0dcd12272a271
Signed-off-by: Christophe Monniez (moc) <moc@odoo.com>
2020-02-20 16:53:33 +00:00
Christophe Monniez 426fc163ba [FIX] tests: avoid confusing traceback at browser start
During an HttpCase, when the Chrome browser starts, it may happens that
the websocket is unreachable. In such a case, the stop method is called
and tries to stop the browser gracefully by sending a `Browser.close`
through the websocket ... which is not reachable.

The result is a confusing traceback. With this commit, nothing is sent
is the websocket is not available.

Moreover, the `sigxcpu_handler` attribute is used in the stop method but
not yet declared. Fixed by moving it before calling the _chrome_start
method.

X-original-commit: 0d156fd3bc114b40680ca5aa0456e0f21a5b8cff
2020-02-20 16:53:33 +00:00
alt-odoo 54e1a69b09 [FIX] point_of_sale: allow deletion of contact to any user
Before this fix, if the user has no PoS access rights, he cannot delete a contact
due to a check done on open PoS sessions.

closes odoo/odoo#45868

X-original-commit: f7b83cfc41045e1cc81d2e1c5540ac105f333a61
Signed-off-by: Alex Tuyls <alt-odoo@users.noreply.github.com>
2020-02-20 17:40:10 +00:00
Romeo Fragomeli 49c46b0bb4 [FIX] mail: activity popup is outside the screen
Before this commit, the popup activity in kanban was rendered using
the position of the button. So the left popup was nearly in the center
of the screen but the width is too large to be contained on the screen.

After this commit, in mobile, the popup activity in kanban will be
placed on the left of the button to avoid to go outside of the viewport.

Steps to reproduce:
* Go to sale app (in mobile)
* Click on the activity button of a kanban card (clock icon) BUG

Task ID: 2198429

closes odoo/odoo#45860

X-original-commit: 392c8a57df798d92b8be73d743b690891cf2fda2
Signed-off-by: Pierre Paridans <pparidans@users.noreply.github.com>
2020-02-20 16:56:13 +00:00
Aurélien Warnon aaa7cfa535 [FIX] survey: only show attendees ranking when relevant
The computed field 'session_show_ranking' was only computed based on the fact
that the survey had a scoring mechanism.

It's not very accurate since we also need a question that saves as the attendee
nickname to be able to display a relevant ranking chart.

This commit fixes the compute method by adding the necessary condition.

Task ID 2188482

closes odoo/odoo#45852

X-original-commit: 86ca11517d3872b2bf3cf89eda513a3bc8c84292
Signed-off-by: awa-odoo <awa-odoo@users.noreply.github.com>
2020-02-20 16:20:49 +00:00
Arnaud Baes caa09423e0 [FIX] sale: Fields in debug mode only.
`require_signature`and `require_payment` were visible in
debug-mode only for seemingly no reasons, making our
sales team having difficulties with our customers payments.

Issue introduced by TaskID #2033229.

closes odoo/odoo#45842

X-original-commit: dffba03715aba7da3c372f61645720a6e122ad74
Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2020-02-20 15:35:10 +00:00
Ravi Singh f47b142a7a [FIX] website: debounce link dialog inputs to avoid useless page loading
When we edit a link on the website, the target page is loaded to find
the anchors. This occured at every typed character which was obviously
not efficient.

task-2187754

closes odoo/odoo#45831

X-original-commit: 06ae0b7b00c837733a9c67772007aee6712b246e
Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2020-02-20 14:51:13 +00:00
Kevin Baptiste 078b9acce7 [IMP] hr_recruitment: track fields on hr.applicant
Track following fields:

    - job_id
    - department_id
    - company_id
    - salary_proposed
    - salary_expected
    - availability

closes odoo/odoo#45294

Taskid: 2195796
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-20 16:57:39 +00:00
Nisha patel 09461be2a2 [IMP] hr_holidays: Change the string of company field due to misleading
Purpose
=======
In multi-company, the group by "company" refers to  the field
"mode_company_id" and not to the company of the employee so due to
that there is a confusion.

So for the field model_company_id:
  - on the views, name the field "Company"(Functionally it doesn't change)
  - on the model, name it "Company Mode".

closes odoo/odoo#45181

Taskid: 2168320
Closes: odoo#45181
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-13 09:43:16 +00:00
Prakash Prajapati 8bda216460 [ADD] web: Add qunit test for company creation/updation
Currently when the company is created or updated the whole
web-client is reloaded

so write a qunit test case when a company is created or when
the data is written to the company for the web-client reload.

closes odoo/odoo#44714

Taskid: 2188789
Closes: #44714
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-14 10:28:11 +00:00
jbm-odoo dd37b849d8 [IMP] hr_holidays: Add expiration date in dashboard
closes odoo/odoo#44669

Taskid: 2166745
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-07 08:39:15 +00:00
Lucas Lefèvre 2d470a423f [IMP] fleet: Close driver history on driver change
Purpose
=======
If you set a future driver and click on "apply change", a new assignation log is
automatically created for the new driver.
But the end date of the former assignation isn't populate.

Specifications
==============
Set the date "end date" for the former driver with the "start date" of the
new driver.

closes odoo/odoo#44635

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-05 10:01:24 +00:00
Ujas Dubal ff23944ad7 [IMP] fleet: Make the image readonly on the vehicle and model
Currently when user change the image on a vehicle, it change it
for the car manufacturer and the goal of this image is to recognize
the manufacturer of the vehicle.

After this commit is applied, the model and vehicle image will be
fixed as per the selected brand image. user will not be able to
change from the vehicle and model.

closes odoo/odoo#44153

Taskid: 2168922
Closes: #44153
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-02-19 10:54:30 +00:00
Adrien Horgnies e28809a1d6 [FIX] l10n_jp: remove country_id from tax_report_line
closes odoo/odoo#45836

X-original-commit: 71969f6dfff1412efee5a34820735492c5f9c850
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-02-20 15:11:01 +00:00
mreficent 3dffce34bf [IMP] fields: log warning for ignored selection
When a field is related, defining a selection or selection_add will
have no effect and the paramater is ignored.

Log a warning and fix all fields badly definied

Closes odoo/odoo#45716

closes odoo/odoo#45832

Related: odoo/enterprise#8613
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-02-20 14:58:33 +00:00
Adrien Dieudonne 62c9227fda [FIX] web: document layout configuration: style not scoped
Commit 9a482fc introduced change for the document layout preview:
all "td" tag included in clearfix were in display: flex;
Because of this some styles were broken in form views on mobile.

We could have only put this rule in the right scope but
we preferred to fix this correctly.

Steps to reproduce:
- Go to Settings
- General Settings
- Click on Configure Document Layout

Related to task-ID: 2184243

closes odoo/odoo#45830

X-original-commit: 0206ee8f8a3652ae0eeb5aa78a94b92bd6e84921
Signed-off-by: Adrien Dieudonné (adr) <adr@odoo.com>
2020-02-20 14:47:04 +00:00
Laurent Smet ffbb32209a [FIX] point_of_sale: Fix js compute_all taxes
The compute_all JS-side hasn't be updated since recent changes in the tax computation introduced by:
https://github.com/odoo/odoo/commit/9b7d14c6b3caba5cde0b98bfaf8aaf887fc94abd

closes odoo/odoo#45801

X-original-commit: d9601cceab365276e43634260be29e2f23749020
Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2020-02-20 11:11:38 +00:00
Victor Feyens d3bbe14c8d [IMP] product: improve creation performance.
The default product category and uom should be fixed on generic 
undeletable records (in data files).

And by caching those default values, we can gain up to 20% time when 
creating products without providing uom and categories.

Also remove the unnecessary defaults on the compute fields, which do the 
same as the compute (and have no use because it is a non stored field).

closes odoo/odoo#45791

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-02-20 14:51:13 +00:00
Victor Feyens 5ccdc1540d [IMP] base: no use of default AND compute for non stored fields. 2020-02-20 14:51:13 +00:00
Victor Feyens 2d688510d1 [IMP] product: do not allow the deletion of the main product category 2020-02-20 14:51:13 +00:00
Victor Feyens 6d94f02ea1 [IMP] sales_team: member_ids search performance.
Each search on member_ids will trigger a ref call (one exists query each
time), whereas we could just directly use the appropriate share field on
res_users.
2020-02-20 14:51:13 +00:00
Victor Feyens f823d1b847 [IMP] sales_team: _get_default_team_id performance.
Avoid using member_ids in the search domain as it does another database
query for each call.  Use the information already in cache instead.
2020-02-20 14:51:13 +00:00
Aurélien Warnon 774d43c49f [REF] survey: clean useless .decode('utf-8') calls
This commit cleans some useless .decode('utf-8') calls when we return rendered
templates results in the survey controllers.

The http module is capable of handling that type of results and the calls were
not necessary / added complexity.

Task '2187328'

closes odoo/odoo#44540

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-02-04 07:37:26 +00:00
Michael Mattiello (mcm) 16c41832a3 [IMP] web: owl_compatibility warn only if debug=assets
Before this commit ComponentAdapter warned on every update and render.
This can make a lot of noises when we use some adpaters.

After this commit ComponentAdapter will warn only in debug=assets mode.

closes odoo/odoo#45583

Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
2020-02-18 08:56:41 +00:00
Joseph Caburnay 2c383aae48 [IMP] web: custom_hooks: useListener able to pass options to addEventListener
addEventListener supports an `options` argument, which can
be useful to listen on events during the capture phase

This commit allows to pass these options to the hook useListener

closes odoo/odoo#45478

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-02-20 12:33:54 +00:00
Odoo's Mergebot 85f6290b68 [IMP] survey, website_livechat: remove header, footer and livechat button from survey layout
Purpose
=======

Lighten the survey layout. It should be free of website footer and header.
Also, livechat button should not appear on survey pages.

Specifications
===========

Survey Layout inherits from web.frontend_layout, mainly to be able to use all the
styles rules defined in it and keep consistency between other frontend pages and survey.

Instead of inheriting another layout, this PR sets no_footer and no_header to True
for all survey layout. The idea is to show only the survey itself without having
other web/website object in the layout.

Also, to avoid having the livechat button displayed on survey layout, 'no_livechat' template variable
has been introduced. The livechat button will be displayed on all layout inheriting from frontend_layout (that is extended in website_livechat to add that livechat button) only if 'no_livechat'
is False. By default, this variable is not set so will be considered as False.
In survey layout, no_livechat is set to True.

Links
=====

Task ID: 2195185

closes odoo/odoo#45112

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2020-02-20 16:12:24 +01:00
Jorge Pinna Puissant bdef3505bd [FIX] sale: avoid adding account_id into section lines
- create a SO with a section;
- create an invoice from the SO.

Before this commit, an SQL constraint was raised : 'Forbidden unit
price, account and quantity on non-accountable invoice line'. This error
occurs, because the default_get function adds a default account_id to
all the lines (including section lines) if a journal_id is passed in the
context. The journal_id is added in the context since : 03353118d3176463fbf779471cc272d31fb11b2e

Now, the default_get function only adds a default account_id if the line
is not a section line or a note line. This avoids the SQL constraint to
be raised, and the invoice is correctly created.

opw-2199356
opw-2199017
opw-2198781
opw-2198650

closes odoo/odoo#45809

X-original-commit: d71830f5d9f9a717194aaa8ec993d99739fe09e7
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-20 12:22:50 +00:00
Rémy Voet (ryv) 59dfbc0829 [FIX] mrp: fix count mo in sale order form
In case of MTO+Manufacture, a sale order have a count of
manufacturing order created from it :

1. create SO with MFG+MTO product with quantity of 5.
2. confirm it. MO will be created for 5 Nos.
3. increase it to 7 . another MO created for 2 Nos.
4. there are 2 MO created based on 1 SO.

It was due that new stock move was merge, and the
'created_production_id' info was lost during the merge (keep only
the original one). To fix, avoid merging stock move with distinct
'created_production_id' (done by override
'_prepare_merge_moves_distinct_fields' and
'_prepare_merge_move_sort_method' methods ).

task-2199568

closes odoo/odoo#45800

X-original-commit: 1fb32cfd17122b625d211a7d22ec319fba35e87f
Signed-off-by: Rémy Voet <ryv-odoo@users.noreply.github.com>
2020-02-20 11:11:17 +00:00
oco-odoo 4b629c7243 [FIX] account, hr_expense: incorrect forward-port
Incorrect forward-port of e09798098679f made in 51d49517a8b5af2d1c85d9c6.

closes odoo/odoo#45775

X-original-commit: 099d0d6785b85dd67ef091fdaef084713fafb3c0
Signed-off-by: Nicolas Martinelli (nim) <nim@odoo.com>
2020-02-20 08:55:15 +00:00