Commit Graph
128610 Commits
Author SHA1 Message Date
Thibault Delavallée ad9d7c5c06 [FIX] website_slides: fix breadcrumb when viewing a slide from a category search
Template expects a category record but controller gives the ID of it.
Oversight of 4ccd859bd4

LINKS

Task 1978729
PR #35061
2019-08-05 08:30:06 +00:00
Kevin Baptiste 15a7aa404b [FIX] note: reset date when adding multiple notes
When adding multiple notes, it was keeping the date of the previous
note in memory. This commit ensures the date is reset each time we click
on "Add a note"

closes odoo/odoo#35374

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-08-02 09:09:26 +00:00
Kevin Baptiste 765e2838dd [FIX] note:open calendar when clicking on the icon
Since commit `a3d98dae68b97aeb7c36ca93c31f067535cbe8fd` the calendar is
no longer opening when clicking on the calendar icon in the activities when
adding a note.
2019-08-02 09:09:26 +00:00
jpr-odoo 21fb7a1f00 [FIX] website_slides: fix the title of the page in fullscreen mode
before this commit, the title of the page is not correct in fullscreen mode

after this commit, set the lesson name as the page title in the fullscreen mode
and changed the title of the page as per click on lesson name

task-2040899

closes odoo/odoo#35161

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-07-30 11:37:22 +00:00
Robot Odoo 9885ccfda4 [IMP] *: correctly read/write website_published
The `website_published` field from the website's mixins is basically a readonly
from `is_published` field.
On read, this field will simply read `is_published` and check if the record's
website_id is accessible (only for the multi mixin).
On write, it will always write on `is_published`.

Whenever possible, any access (read/search) on published state should be done on `website_published`.
Any write should be done on `is_published`.

This PR improves a few things:
- A lot of code was writting on website_published which was just then writting
on is_published. Writting directly on is_published makes more sense.
- Some backend fields would still reference `website_published` instead of
`is_published` which would just go through the related for no reason.
Plus, using `is_published` will make the field tooltip more accurate as we
are not in a website context ('Visible on current website' to 'Is Published')
- Filter and search on tree view were still using the `website_published`
related field, which is just a readonly when we are not in a frontend
context.
- Some create and write function would have security check on
`website_published` value but that was wrong as the user could bypass that by
simply writting on `is_published`. For the write method, check `is_published`
is more accurate as it will cover both case since `website_published` will
then call the write method on `is_published`
- Some models would create their own `website_published` field rather than using the
`website.published.mixin` mixin which should be used instead.
That was done to be able to override the default value of the boolean.
This commit simply adds the possibility to override the default value of the
mixin field.
- Fix wrong publish security check that were only checking `website_published` in vals.

closes odoo/odoo#35189

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-08-03 13:17:04 +02:00
Romain Derie 4086f344d8 [FIX] website: correctly check security of publish mixin
Commit 916968058d introduced a mechanism to check rights when writing or
creating on `website_published` field.
Problem is, `website_published` is just kind of a related to `is_published`
which really stores the value.

Thus, the checks would not work when writing/creating on `is_published`.
That would leave a loophole to bypass the expected behavior.
2019-08-03 09:51:22 +00:00
Romain Derie 7a90dedd25 [IMP] website*: use published mixin rather than own field
*website_crm_partner_assign, website_customer

Before this commit, some models would create their own `website_published`
field rather than using the `website.published.mixin` mixin which should be
used instead.

That was done to be able to override the default value of the boolean.

This commit simply adds the possibility to override the default value of the
mixin field.

Also, help and string could simply be added on xml views rather than overriding
the field.
2019-08-03 09:51:22 +00:00
Romain Derie cc1d78a80b [IMP] *: correctly read/write website_published
The `website_published` field from the website's mixins is basically a readonly
from `is_published` field.
On read, this field will simply read `is_published` and check if the record's
website_id is accessible (only for the multi mixin).
On write, it will always write on `is_published`.

This commit improves a few things:
- A lot of code was writting on website_published which was just then writting
  on is_published. Writting directly on is_published makes more sense.
- Some backend fields would still reference `website_published` instead of
  `is_published` which would just go through the related for no reason.
  Plus, using `is_published` will make the field tooltip more accurate as we
  are not in a website context ('Visible on current website' to 'Is Published')
- Filter and search on tree view were still using the `website_published`
  related field, which is just a readonly when we are not in a frontend
  context.
- Some create and write function would have security check on
  `website_published` value but that was wrong as the user could bypass that by
  simply writting on `is_published`. For the write method, check `is_published`
  is more accurate as it will cover both case since `website_published` will
  then call the write method on `is_published`
2019-08-03 09:51:22 +00:00
Andrea Ulliana f9c2716b3e [IMP] website_forum: bring forum modes
It is now possible to specify the forum mode : Questions and Answers or
Discussions. In Q&A mode, a user can only reply once while there is no
limit in Discussions mode.

task-2008910

closes odoo/odoo#34097

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-08-02 16:32:29 +00:00
Romain Derie cfeb8a5185 [FIX] mail: remove useless hasattr on get_base_url
This check was introduced with d82b897ea1 in 12.0 where `get_base_url` was
not yet a model method.

Since f727cd2645, in saas-12.5, that method is now on model, making the
`hasattr` check useless.

closes odoo/odoo#35057

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-07-24 10:48:53 +00:00
Robot Odoo 6df11fc42d [MERGE] *: rename image fields and use image.mixin
Merge commit for PR #34925
Related enterprise PR odoo/enterprise/pull/4865

The goal is to:
- Use `image.mixin` on the models currently storing multiple image sizes.
- Create Image field and use it on models where mixin is overkill.
- Rename the image fields to contain the pixel number in the name.
- Add 512 size.
- Clean up `image.mixin`, zoom field, variant fields.

Note: models that currently store only a single size image will not be changed
in this PR.

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-08-02 20:36:51 +02:00
Sébastien Theys 45e3be94c0 [IMP] tools, base: removed unused image helpers
PR: #34925
2019-08-02 16:47:58 +00:00
Sébastien Theys 1e9772889b [IMP] *: use image.mixin when appropriate
The following models are already using big images, or they might need big images
in the future:

- partner
- hr employee
- shop category
- lunch product
- gamification badge and karma rank

PR: #34925
2019-08-02 16:47:58 +00:00
Sébastien Theys f0ffbea173 [IMP] *: remove unnecessary image sizes
The big images are probably never going to be used for the following models:

- pos category
- fleet brand
- livechat channel
- mail channel
- payment acquirer

And if big images are needed some day the model should use image.mixin instead.

PR: #34925
2019-08-02 16:47:58 +00:00
Sébastien Theys 1b85ab93ec [IMP] base, product, website_sale: move image zoom out of mixin
This field is not necessary on most models so move it to the few places where it
is needed to avoid computing it and storing it everywhere.

PR: #34925
2019-08-02 16:47:58 +00:00
Sébastien Theys 58a2ffa26f [IMP] *: rename image fields
image_original => image_1920 (now resized to 1920)
image_big => image_1024
image_large => image_256
image_medium => image_128
image_small  => image_64
image replaced by image_1920 (when writing) or by image_1024 (when displaying
	what was previously the big size)

+ add new intermediate format:
image_512

PR: #34925
2019-08-02 16:47:58 +00:00
Sébastien Theys 8206b5b4cc [IMP] fields: add image field
PR: #34925
2019-08-02 16:44:47 +00:00
Hardik Prajapati ec32fd5459 [FIX] account: traceback while creating Bank statement
Validate a bank statement from reconciliation widget and then open the statements view from the widget and try creating a new statement. An error happens when trying to select a partner because the default journal is not set in the action

closes odoo/odoo#35418

Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2019-08-02 15:19:38 +00:00
mreficent aafc5f7821 [IMP] base: add external id in error message
The view name is often not very informative, add the external id for a better
error

closes odoo/odoo#29473

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-02 14:58:14 +00:00
Robot Odoo de4a945304 [MERGE][REF] utm, mass_mailing: improve and use utm.campaign
This merge removes the mass_mailing.campaign model. Instead of having a
fully fledged model, we will simply inherit utm.campaign.

This change implies that mass_mailing.tag and mass_mailing.stage move to
the utm model along their associated views/data.

These changes were made so that campaigns could be used in the future by
social, mass_mailing and mass_sms and available in the same view

This commit also removes the source_id and the medium_id fields on the
campaign. Indeed those depends on the flow, not the campaign (mass mailing
is a source, email is a medium for example).

In this merge we also add statistics from crm and sales to the campaign
model like what has been done for mass mailing previously.

Task ID: 2002029&
PR: #34015

closes odoo/odoo#34452

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-08-02 17:49:45 +02:00
qmo-odoo 01ec59b2e5 [REF] mass_mailing: Renaming 'mass_mailing_' fields to mailing
This commit renames the mass_mailing_ids and the mass_mailing_clicks_ratio
to mailing_ids and mailing_clicks_ratio. Indeed it is shorted and more
inlined with the new model names.

Task ID: 2002029
PR: #34015
2019-08-02 12:36:07 +00:00
qmo-odoo d716b53883 [REF] website_links: set is_website to True on the campaign
PURPOSE

This commit removes the mass_mailing.campaign model. Instead of having a fully
fledged model, we will simply inherit utm.campaign. We will also add relevant
statistics on utm campaign model in order to use it in various applications.

SPECIFICATIONS

This commit changes website_links.js so that, when creating a campaign,
the field is_website is set to true.

This will allow us to filter irrelevant campaigns in mass_mailing and social

Task ID: 2002029
PR: #34015
2019-08-02 12:35:39 +00:00
qmo-odoo 4f92430139 [FIX] mass_mailing_sale: fix domain for invoiced
PURPOSE

This commit removes the mass_mailing.campaign model. Instead of having a fully
fledged model, we will simply inherit utm.campaign. We will also add relevant
statistics on utm campaign model in order to use it in various applications.

SPECIFICATIONS

This commit fixes the domain used to get the invoiced amount generated
by the mailing.mailing.

The new domain will be the same as the one used in the invoice report

Task ID: 2002029
PR: #34015
2019-08-02 12:34:17 +00:00
qmo-odoo 682b62f825 [IMP] sale, utm: add sale statistics to utm campaign
PURPOSE

This commit removes the mass_mailing.campaign model. Instead of having a fully
fledged model, we will simply inherit utm.campaign. We will also add relevant
statistics on utm campaign model in order to use it in various applications.

SPECIFICATIONS

This commit adds revenue and quotations statistics on the
kanban and the form view of the utm.campaign

Kanban and form views will now display the invoiced_amount
and the number of quotations generated by the campaign.

TaskID: 2002029
PR: #34452
2019-08-02 12:33:56 +00:00
qmo-odoo f49d83f07d [IMP] utm, crm: add lead/opportunity stats on campaign
PURPOSE

This commit removes the mass_mailing.campaign model. Instead of having a fully
fledged model, we will simply inherit utm.campaign. We will also add relevant
statistics on utm campaign model in order to use it in various applications.

SPECIFICATIONS

This commit adds leads/generated statistics in the kanban and
the form view of the utm campaign.

Kanban and form views will now display the number of leads and
opportunities generated with the campaign

TaskID: 2002029
PR: #34452
2019-08-02 12:33:42 +00:00
qmo-odoo a661b00015 [REF] utm,mass_mailing: replace mass mailing campaign by utm campaign
PURPOSE

This commit removes the mass_mailing.campaign model. Instead of having a fully
fledged model, we will simply inherit utm.campaign. We will also add relevant
statistics on utm campaign model in order to use it in various applications.

SPECIFICATIONS

This commit removes the mass_mailing.campaign model. Instead of having a fully
fledged model, we will simply inherit utm.campaign. This change implies that
mass_mailing.tag and mass_mailing.stage have to move to the utm model along
their associated views/data.

These changes were made so that campaigns could be used in the future
by social, mass_mailing and mass_sms and available in the same view

This commit also removes the source_id and the medium_id
fields on the campaign.

This commit also moves the unique_ab_testing field from the mass_mailing_campaign
to the mass_mailing model

Task ID: 2002029
PR: #34015
2019-08-02 12:32:35 +00:00
wan 2d086f5d8f [IMP] account: credit note usability
Task 2038326

* Tick the credit note sequence by default on the customer invoices and vendor bills journals
* Write Customer Invoice/Vendor Bill/Credit Note/Customer refund at the top of the document
* The reference field should be printed on the credit note pdf (interesting because it gives source and reason)
* If the document is a credit note, there shouldn't be any payment information on the pdf (the customer doesn't have to pay you) (currently you see the "payment communication" the customer is supposed to use)
* Rename Credit Note to Refund on dashboard
* Add tooltip on payment widget

closes odoo/odoo#35231

Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2019-07-31 14:39:22 +00:00
Josse Colpaert b66d84119c [IMP] l10n_ca: add PST number on partner for the invoice
If you have a PST number, certain taxes
don't need to be paid, but the number
should be indicated on the invoice however.

opw-1951352
Closes #31982

Signed-off-by: Cedric Snauwaert (csn) <csn@openerp.com>
2019-05-15 15:06:12 +00:00
jbm-odoo e967435b2d [IMP] mail: Change validation success message
If the connection test to mail server succeeds, we shouldn't see
"Oops something went wrong" and "User Error" either

Replace error generation to display success message by bus notify.

closes odoo/odoo#35292

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-02 11:47:35 +00:00
jbm-odoo 252609d375 [IMP] employee profile: Reload the view if language changed
When a user change his langage in employee profile, he doesn't see
the result before reloading manually the page.

With this commit, when a user change his language, the page is
reloaded on saving. And remove Create button on My Profile

closes odoo/odoo#34906

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-02 11:44:45 +00:00
Naglis Jonaitis 0fe2b4530f [IMP] *: remove digits attribute from Monetary fields
* account, hr_contract, hr_expense, point_of_sale, sale_margin,
website_sale_delivery, website_sale_wishlist

digits only works on Float fields, on Monetary fields it has no
effect:

- The column_type of a monetary field is always numeric
- It is not applied in `convert_to_column()` or `convert_to_cache()`
- It is not part of `description_attrs`, so it will not be included in
the output of `fields_get()`

closes odoo/odoo#35336

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-02 11:17:12 +00:00
Ravi Gohil 914a722f81 [IMP] l10n_th: replace VAT return report
- Added zero rated and exempted taxes
- Improved 7% tax label
- Removed unused tax group

opw-39083

closes odoo/odoo#35203

Signed-off-by: oco-odoo <oco-odoo@users.noreply.github.com>
2019-08-02 11:06:01 +00:00
Kevin Baptiste 6542f3c41f [IMP] website_livechat: improve general usability (back2basics)
Purpose
=======

Clean screens and improve onboarding

TaskID: 2029772

closes odoo/odoo#34543

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-02 11:33:22 +00:00
Martin Trigaux 66dea8bb7b [REF] web: remove raw_mode flag on export
The export is now always in raw_mode
Adapt the tests

Fixes odoo/odoo#18798

closes odoo/odoo#26724

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-02 08:53:24 +00:00
Robin Heinz 987951a8d4 [IMP] point_of_sale: Navigation as employee from frontend to backend.
We added a button for the front end closure to go back to the back end.
Before this, the only way to go back was to change the URL, now we can close the session with the frontend properly.

Also moved the css related to pos_hr in the good directory.
Task-id: 2032178

closes odoo/odoo#34948

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-08-02 09:33:05 +00:00
Pierre Masereel 2ef96ee8cc [FIX] stock_account: valuation layer access rights
When we try to validate a pos session without beinig administrator, we
don't have access rights on the valuation layer.

So we've extended this rev: 7ef11e3c96
2019-08-02 09:33:05 +00:00
Yannick Tivisse 690f457541 [IMP] hr_expense: Improve modifiers to allow inheritance
closes odoo/odoo#34553

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-02 07:47:32 +00:00
Swapnesh Shah 098a4ba67a [IMP] project: improve Warning message for task recursion
Use same as other _check_recursion error messages

closes odoo/odoo#33125

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-02 09:12:31 +00:00
Vincent Schippefilt 75aca37453 [IMP] web: listview remove extra style on click
Before this commit, when clicking on a cell in the listview, the cell
receives the focus, which makes it have an extra style (darker gray)
when waiting for the page to laod.

After this commit, the extra style will only be added when using the
keyboard to navigate between the cells and not on click.

task-id: 2041902

closes odoo/odoo#35303

Signed-off-by: Mathieu Duckerts-Antoine <Polymorphe57@users.noreply.github.com>
2019-07-30 14:21:46 +00:00
Naglis Jonaitis 0c413c26af [IMP] hr_attendance: drop redundant attribute
This appears to be leftover from a C/P from the line above, however
`type="html"` does not make much sense on `<p>` element.

closes odoo/odoo#35124

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-23 20:41:15 +00:00
Jinal Patel c8a30c2d81 [ADD] repair: add Responsible field on Repair Order
task- 1945878

closes odoo/odoo#35056

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-07-30 09:30:10 +00:00
Jinal Patel d9ac2e3485 [ADD] repair: add Graph view on Repair Order
- add Reporting > Repairs menu on Repair Order
 - also added pivot view

task- 1945878
2019-07-30 09:30:10 +00:00
Jinal Patel bc067ed388 [ADD] repair: add Tags field on Repair Order
- add Configuration > Repair Orders Tags menu
 - Configuration menu should only be available for Stock/Manager

task- 1945878
2019-07-30 09:30:10 +00:00
Jinal Patel 5006d48203 [ADD] repair: add Parts filter in Repair Order search view
task- 1945878
2019-07-30 06:33:06 +00:00
Martin Trigaux 294a857f4f [IMP] doc: add reference to _lt method
Was added at odoo/odoo#31211

closes odoo/odoo#35393

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-02 06:57:01 +00:00
Naglis Jonaitis f17f2e8336 [IMP] website_theme_install: typo in model class name
closes odoo/odoo#35389

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-01 20:27:30 +00:00
Naglis Jonaitis 7417d8fc13 [IMP] *: fix typos in field definitions
* account, crm, hr, im_livechat, l10n_ch, l10n_it_edi, mail,
mass_mailing, project, stock, base

- `String` -> `string`;
- `defaut` -> `default`;
- `defaults` -> `default`;
- `reandonly` -> `readonly`;
- removed redundant `placeholder` attribute for `Char` field;
- removed redundant `size` attribute for `Float` and `Integer` fields;
- changed to use `Selection` instead of `Char` for a field having a
defined `selection`.

closes odoo/odoo#35356

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-31 17:14:19 +00:00
Gert Pellin ef99ea2daa [IMP] product, sale, sale_management: move discount group on product
The group 'group_discount_per_so_line' is used on reports in
point_of_sale but is created in 'sale' module and point_of_sale doesn't
depends on sale. So we've move this group on product to be able to
properly use it in point_of_sale.

TASK-ID: 2008468

closes odoo/odoo#35041

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-08-02 07:19:47 +00:00
Pierre Masereel eba2d26e90 [FIX] point_of_sale: set back orders stat button
The stat button on the pos session that shows the different POS orders
linked to the session has been deleted by mistake in rev: 91532b7b13

So we've set it back.
2019-08-02 06:55:43 +00:00
Gert Pellin ccce07680f [IMP] point_of_sale: improve views of pos objects
We made here some small changes on the views of different object of POS
module, and set the field journal_ids required in the views, because
launching a POS without payment method won't magically assign one
anymore.

TASK-ID: 2008468
2019-08-02 06:55:39 +00:00