Commit Graph
128338 Commits
Author SHA1 Message Date
svs-odoo 2edf100c8f [FIX] stock: hide lot_id on quant list
Before this commit, the field `lot_id` was hidden when useless for the
editable quant list, but was always present in the readonly quant list.
Now, the `lot_id` is hidden when appropriate in the two lists.

closes odoo/odoo#35008

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-07-26 12:22:34 +00:00
svs-odoo b39173a8ff [FIX] stock: edit quant without company id
Some quant can have no company_id (quant for partner locations).
But when user edit a quant, the stock move `company_id` is based on the
quant's one. As the `company_id` is required for a stock move, we force
to take the `company_id` of the user in case the quant don't have one.

Task #2035465
2019-07-26 12:22:34 +00:00
svs-odoo 70f99448d5 [FIX] stock: forbid edition of inventory loss quant
As quant from inventory loss location balances real quantity, it could
be really hazardous to able user to modify it. That said, modify it now
has no effect. So, with this commit, we exit the quant write method in
case of user tries to modify it manually if the quant location is
inventory loss, and we inform the user he can't modify it.

We could set the field as readonly in this case, but it's clearer for
user to inform him/her in case he/she tries to modify the quant than set
the field as readonly and take the risk user don't understand why he/she
can modify some quant and can't modify some other.

It would be preferabler to raise an UserError in the write than do
nothing in the write and return a warning in the onchange, but in case
we raise an error in the write method, user side the field is still in
edit mode and then, every time user clicks somewhere but on Discard, it
will raise the error again and it's not convenient for the user.

Task #2035465
2019-07-26 12:22:34 +00:00
Adrian Torres 2971bf6100 [MOV] core: put things where they belong
This commit moves some ir_ui_view specific functions into ir_ui_view.py
and removes some old-api <-> new-api compatibility shims as well as
removes orm.py since it has 0 to do with the Odoo ORM.

closes odoo/odoo#34826

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-26 09:07:19 +00:00
aca 78565b1dc9 [REM] web_settings_dashboard: Merge module into base_setup
Purpose
=======

Currently, when we click on “Settings” on the Home Dashboard, we arrive
on a new Dashboard with several pieces of information like Installed Apps,
invite new users, or translations. Some informations are reachable in
several ways, which is not necessary.

We would like to remove this page and replace it with the General Settings
page directly. That makes more sense to the user who click on “Settings”. The
present informations will be dispatched in the menu or in the general settings
for a better usability.

Specification
=============

This commit move code from web_settings_dashboard in order to put the features
in settings directly. To do so, we choose to move code to base_setup, and create
widget on the settings form view to keep features. Concerned features are: invite
users, dev tools, odoo edition number and IAP account link.

TaskID: 2006910

closes odoo/odoo#34290

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-07-26 09:53:46 +00:00
Yannick Tivisse a8893ad299 [IMP] utm: Add linkedin medium in data
closes odoo/odoo#35094

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-07-26 08:47:03 +00:00
Yannick Tivisse 430a10c39b [IMP] hr_recruitment: Remove informative field
Not used anywhere, and will be correctly implemented with the
referral application.
2019-07-26 08:47:03 +00:00
Yannick Tivisse 43c5a7d74f [IMP] web: Implement confirm attr on kanban views
Purpose
=======

On a form view, it's possible to add a confirm attribute to open a
popup when clicking on a button.

This mechanism is not implemented on kanban views, and would imply to
create a specific wizard just for that in the referral application.
2019-07-26 08:47:03 +00:00
Yannick Tivisse 0c07495391 [FIX] website_form: Allow to post a message with attachments
Coming from the sudo() modification. The mail.message is created in sudo,
but the user is still the public user, who doesn't have a email address,
leading to an raised error.
2019-07-26 08:47:03 +00:00
Hetal Dhanak 199bf06ca1 [FIX] website_sale_coupon: show promo code success message.
Previously, success message for promocode was visible only
when user clicked on "I have a promocode". even
when it was successfully applied.

After this commit, message will always appear once a promocode
has been successfully applied.

Task-2027008

closes odoo/odoo#34591

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-07-26 08:53:36 +00:00
Yenthe666 a2a5ff806e [IMP] crm_iap_lead,website_slides: add name on main elements
for easy xpaths

closes odoo/odoo#34909

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-26 08:13:55 +00:00
Yenthe666 1f87abfead [IMP] utm,website_slides: add sheet to form view
For better rendering

closes odoo/odoo#30629

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-26 08:07:44 +00:00
Khalid Hazam 759130af16 [CLA] BADEP signs Odoo CCLA
closes odoo/odoo#35193

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-26 07:35:29 +00:00
王挺 ac658522df [IMP] Stock: "Manual Replenishment" translatable.
closes odoo/odoo#35200

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-07-26 00:58:47 +00:00
Simon Lejeune 72c36aaf90 [REF] stock: scrap in receipt
In the receipts, you can only scrap after the reception. This implies
that the source location of the scrap move is the destination location
of the picking.

Create the scrap move as draft, else in the receipt it used the state of
the picking (done) and calling _action_done again resulted in double
valuation layers

task-2042399

closes odoo/odoo#35179

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-07-25 14:32:05 +00:00
Enric Tobella 2486259ef9 [IMP] base: reduced number of checks on module loading
If you have a module with several dependencies or a complex dependency
graph, the system repeats the number of checks of a module.
For example: we have 4 modules A, B, C and D, where A depends on B and C,
B depends on D and C depends on D.
Before this patch, we check once if A is installed, once if B is
installed, once if C is installed and twice id D is installed.

With this patch, D is checked only once.

On this example, the difference is minimal but on worse scenario as
explained on the below issue, the processing time was provoking a
timeout on test platform
https://github.com/odoo/odoo/pull/29779#issuecomment-452821082

Cherry-pick to master of #29779

closes odoo/odoo#35185

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-25 14:01:55 +00:00
Lucas Perais (lpe) a6f66f8bcf [FIX] web: translatable size of binary fields
Before this commit, the string containing all size units for binary fields
was comma separated.
The problem with this is that comma got also translated into the language's specific
comma-like, whereas in this case it is obviously a technical separator which shouldn't be translated

After this commit, we separate unit size with pipes (|), hoping that this character
- is easy to find on any keyboard
- has no language specific equivalent

OPW 2041975

closes odoo/odoo#35183

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-25 13:03:48 +00:00
王挺 3d397f208a [CLA] Add another email to tanghulu0608
closes odoo/odoo#35160

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-25 14:09:37 +00:00
Adrian Torres bc99500799 [FIX] base: fix oversight
The bug triggers during an upgrade of base (tested while migrating from
12.0 to master).

Introduced at 074074e570

closes odoo/odoo#35153

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-24 14:52:03 +00:00
Robot Odoo 46843ee488 [MERGE] event(_sms): integrate SMS into event communication scheduler
PURPOSE

Allow the user to schedule SMS communication on events

SPECIFICATION

In event.event form view:
* rename tab 'Email Schedule' to 'Communication'
* add a selection field at the beginning of event_mail_ids with label 'Send'
and values 'Email' and 'SMS Text Message' (required with default value
'Email');
* add support of SMS template and SMS sending in event communication;

Add SMS template data
* Name: Event: Registration (see data)
* Name: Event: Reminder (see data)

Improve registration model
* add a mobile field to the attendees form view: https://nimb.ws/p0VvyS

Technically this task uses the newly-introduced API methods allowing to
send and schedule SMS.

MIGRATION

Some notes on migration

* event.registration: new mobile field in addition to phone, may be void;
* event.type.mail and event.mail: new notification_type field. Existing
rows: set value to 'mail'.

LINKS

Task 1922187

closes odoo/odoo#34705

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-07-25 17:27:00 +02:00
Thibault Delavallée 62ac23f0b9 [ADD] event_sms: allow to schedule SMS in event communication
PURPOSE

Allow the user to schedule SMS communication on events

SPECIFICATION

In event.event form view:
  * rename tab 'Email Schedule' to 'Communication'
  * add a selection field at the beginning of event_mail_ids with label 'Send'
    and values 'Email' and 'SMS Text Message' (required with default value
    'Email');
  * add support of SMS template and SMS sending in event communication;

When sending SMS on event registrations, keep a log of what has been sent.
Use mobile or phone field of event registration as both may contain valid
values, like partner model.

Add SMS template data
  * Name: Event: Registration (see data)
  * Name: Event: Reminder (see data)

Improve registration model
  * add a mobile field to the attendees form view: https://nimb.ws/p0VvyS

Technically this task uses the newly-introduced API methods allowing to
send and schedule SMS.

LINKS

Task 1922187
Part of PR #34705
2019-07-25 11:47:20 +00:00
Thibault Delavallée 2e2fd3f8a7 [IMP] event: improve test class and data to help reusing them
PURPOSE

Allow the user to schedule SMS communication on events

SPECIFICATIONS

In order to add tests this commit performs a quick cleaning of event common
class to speedup and prepare new tests.

Containing
  * move data creation in class and use savepoint;
  * move registration creation in its own method to allow calling it if
    necessary;
  * clean some unnecessary variables.

LINKS

Task 1922187
Part of PR #34705
2019-07-25 11:45:08 +00:00
pha-odoo 947715b046 [FIX] iot: pass dict to scale action
Scale action took a string as argument.
It now takes a dict so parameters can be passed to action methods.

closes odoo/odoo#35136

Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
2019-07-24 09:42:44 +00:00
Xavier-Do 735ee5487c [IMP] core: improve test logs
1. Make test logs clearer & remove redundancies

Instead of having an ERROR log right when the test fails then print
the useful / relevant information at the end of the test suite,
immediately print the traceback. Keep the final summary. Also avoids
having to wait for the entire test suite to end before a dev' can know
the failure details of a specific test.

Done by working at a lower level and replacing the custom
test stream mess by a custom Result class which prints and formats the
information we want. Replace TextTestRunner by a bare-bones custom
Runner object to tie it in.

2. Provide useful location information on test failure

Leverage the work above to log the test function's failure location:
previously logging would point to within TestStream which is not
useful.

Here, on failure the traceback is used to discover the caller info and
point to the test line which fails instead. similar to unittest's
_exc_info_to_string (https://github.com/python/cpython/blob/93e8aa62cfd0a61efed4a61a2ffc2283ae986ef2/Lib/unittest/result.py#L173).

3. Replace direct logging in browser_js by raising errors

Properly marks the test as in error, and the error traceback points to
the tour definition / launcher (python side) rather than common.py
and/or module.py.

Also removes unused dbname parameter that was added in
/278ed718e9805edf088642ba10d3b7c4e5716c31/openerp/modules/module.py#L361
for nor visible reason

closes odoo/odoo#34996

Signed-off-by: Xavier Morel (xmo) <xmo@odoo.com>
2019-07-25 12:09:27 +00:00
Naglis Jonaitis 16589ddc19 [FIX] l10n_si: fix typo in manifest key
closes odoo/odoo#34962

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-07-17 21:56:11 +00:00
Lucas Perais (lpe)andJulien Mougenot fc5878ecc6 [IMP] base, web: static xml templates support serverside inheritance
QWeb templates that show up in the 'qweb' key of a module's manifest
now support server side inheritance and xpath evaluation

QWeb templates that show up in the xmlDependencies of a JS widget are not
impacted at all by theses changes, as they are served through the
Werkzeug sharedMiddleware

A similar syntax than ir.ui.view has been implemented in the QWeb templates
- each template must have a root node, whatever tag works

- the root node of a template must have a t-name containing the name of the template
The name -- without the module's name -- may contain dots pretty much anywhere
Though what is recommended is only underscores in template names

- if a template is to inherit from a parent, the root node has a t-inherit directive
containing either the full name of the template it inherits from which is module_name.template_name
or the name of the template, no module name necessary, if the parent template is in the same module

- there are 2 modes of inheriting
primary: copy the behavior of the parent into the template
extension: modifies the parent in place

Task: 1999528

closes odoo/odoo#33892

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>


Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Lucas Perais <lpe@odoo.com>
2019-07-24 12:21:59 +00:00
Rohan Patel 8be4567ae8 [IMP] website: allow to set independent website and company logos
task-1968099

closes odoo/odoo#32716

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-07-25 08:20:33 +00:00
fja-odoo cc87d6d4c8 [FIX] website, *: fix wishlist animation
* = website_sale, website_sale_wishlist

The wishlist animation was not handling the affixed navbar and always
referring to the main one.
Now the animation will target the right navbar if we scroll down.

When the navbar is duplicated, the ids of the tags were kept which is
wrong and was producing bugs such as the wishlist button not showing up
on the floating navbar on the first product added to the wishlist and
the first issue. Now the id is removed from the clone and never used
in JS code. Its only purpose is for the xpath of the wishlist button.

When a product was added to the cart from the wishlist and the affixed
navbar was displayed, the product was hidden before the animation was
completed. This changed the height of the page and the animation went to
the middle of the page instead of the button. This is now fixed too.

task-2002122

closes odoo/odoo#34358

Signed-off-by: Quentin Smetz (qsm) <qsm@odoo.com>
2019-07-25 07:54:02 +00:00
Yenthe666 37444769dd [IMP] website_blog: make SEO fields available in backend
closes odoo/odoo#35033

Signed-off-by: Jérémy Kersten (jke) <jke@openerp.com>
2019-07-24 17:05:52 +00:00
Pratima GuptaandSébastien Theys 61de1c263a [IMP] portal: allow attachment upload from portal chatter
Before this commit, it was only possible to add attachments on documents from
the backend or by sending them by email.

It is now possible to add them also from the portal chatter, including for
portal/public users who have a valid access_token.

Part of task-37264

closes odoo/odoo#34526

Signed-off-by: Olivier Dony (odo) <odo@openerp.com>


Co-authored-by: Pratima Gupta <pgu@odoo.com>
Co-authored-by: Sébastien Theys <seb@odoo.com>
2019-07-24 12:30:31 +00:00
mgh-odoo 997bd55016 [IMP] web: display stat button of form_view similar to enterprise
In order to display properly the futur ribbon, community stat buttons to
be displayed like in enterprise

task-2035081

closes odoo/odoo#35040

Signed-off-by: VincentSchippefilt <VincentSchippefilt@users.noreply.github.com>
2019-07-24 08:09:03 +00:00
Hetashree Chauhan c2c31ed47a [ADD] sale_purchase: testcase for choosing best supplier.
Add a test case to choose the best supplier.
If any product is having multiple suppliers for a different quantity,
then the system will choose the supplier based on the ordered quantity and
minimum price.

task-1947351
closes: https://github.com/odoo/odoo/pull/34049

closes odoo/odoo#34049

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-07-24 09:35:37 +00:00
Hetashree Chauhan 33c636cf28 [IMP] product: find best price for a vendor based on min qty.
Purpose of this task:
Choose a vendor with the minimum price, respecting the quantity
Before commit:
The system was choosing the vendor by sequence,
But if there are any vendor having a different price for the same product,
based on ordered quantity, then the system can't choose the lowest price.
After this commit:
If there are vendors having different price based on the ordered quantity,
then the system will choose the vendor based on the quantity and lowest price.

task-1947351
closes: https://github.com/odoo/odoo/pull/34049
2019-07-24 09:35:37 +00:00
Pierre Masereel 66c49dd451 [FIX] stock: use current company
Since changes made on multi-company, env.user.company_id doesn't
reprsent the the current company anymore, it is only the company in
which the user will be connected by default in Odoo.

The current main company is now available under env.company, so we use
now the current company instead of the user default.

closes odoo/odoo#35129

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-07-24 07:53:34 +00:00
Pratima Gupta 00476acea0 [IMP] stock: hide from and to locations from receipt and delivery
In this commit -
In detailed operations wizard, from and to locations should be hidden when -

1) Operation type is of 'Vendor' (From location)
2) Operation type is of 'Customer' (To location)

task-2036654

closes odoo/odoo#35062

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-07-23 05:52:59 +00:00
David Beguin 6b10864bb9 [IMP] gamification : remove karma_position field
Since task Id 2000687  and PR #33475, karma position field is not necessary anymore
as the karma position is computed directly in the website_profile controller.

Task ID: 2001367
PR #35103

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-07-23 12:33:29 +00:00
Joseph Caburnay 0244f2e55d [FIX] point_of_sale: fiscal position map to empty tax
This commit fixes the following faulty behaviors:

1. There is a traceback in the pos ui when the selected
customer has fiscal position that maps a tax to nothing.
To prevent this behavior, we avoid to add the undefined
tax destination.

2. When you change the customer in pos ui from someone who
has fiscal position to someone without, the tax in the
order remains to be based on the previous customer. The
tax should change to original tax of the product or
to the tax mapped by the default fiscal position of
the session. To avoid this behavior, we now set the
default fiscal position on the order when a customer has
no fiscal position.

closes odoo/odoo#34955

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-07-23 12:32:17 +00:00
Robin Heinz 76fc5b772d [IMP] point_of_sale: new state on session
To have a better flow when a session needs to be cash controled and
really opened, we've added a state on the session which is 'new_session'
to identify the new sessions that have not been cash controled yet.

TASK-ID: 1934784

closes odoo/odoo#33948

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2019-07-23 07:41:21 +00:00
Robin Heinz 91532b7b13 [IMP] point_of_sale: closing pos session view
The view of the POS session when you close it and see all the
transactions that have been performed during the session has been
improved to clearly see the summary of the session and easily check your
cashbox at the begining and end of the session.

TASK-ID: 1934784
2019-07-23 07:41:20 +00:00
Robin Heinz cdeb65ae35 [IMP] point_of_sale: difference amount authorized on POS config
You can currently set a difference amount authorised in a cash journal
when a pos session is closed. This feature, allow a POS user to validate
a POS session having a difference between what you are supposed to have
in your cashbox and what you are really have. If the difference is too
big, you have to be POS manager to close the session.

We've improved the feature:

First we've moved the difference limit from the journal on POS config
and not on the journal as it is more a way that the POS is used than an
accounting configuration.

We've also added a wizard to warn a pos manager that the difference is
too big, because before the manager could always validate a session
without being warned that there can be a problem.

TASK-ID: 1934784
2019-07-23 07:41:20 +00:00
Robin Heinz 2eb1cde534 [IMP] account, point_of_sale: take money from cash journal
When you have a cash journal, you have the opportunity to use a wizard
to easily create the statement. There are two wizards, one to add money
in the journal, and one to remove money.

To simplify the code and remove some duplication, we are now using only
one wizard, that will allow to add and/or remove money from the cash
journal.

TASK-ID: 1934784
2019-07-23 07:41:20 +00:00
Pierre Masereel 733fb360d2 [IMP] account, point_of_sale: properly handle cashbox
When you use a cash journal in the point of sale, you can enable the
'Cash Control' option on your pos config to be able to count the money
in your cashbox before and after selling goods in the POS.

To better manage this behavior, we've made some improvements to handle
the starting and ending of a session.

First, instead of having just some cashbox lines set on the pos config
representing the default cash fund in the cashbox, we are using an
object of type cashbox as template. This allows to use the same default
config for multiple POS config without recreating it.

Then, we've added a currency on the cashbox, which is just computed
based on the currency referencing the cashbox.

When a POS session is open, the content of the cashbox is the same as
the last closed session, to represent how a real cashbox works.

We also always have the possibility to set the default cashbox of the
POS config at the begining of a session.

TASK-ID: 1934784
2019-07-23 07:41:20 +00:00
Pierre Masereel 0d9c36254f [IMP] point_of_sale: remove unused message
TASK-ID: 1934784
2019-07-23 07:41:20 +00:00
Pierre Masereel d786cb13f6 [IMP] account: default cash difference account
When a cash journal is used in POS, we need to have accounts to post the
difference between what it's supposed to be in the cash journal and what
we really have in the cashbox.

To help the user to configure his cash journal, we've added default
accounts for cash difference in the localisation. Those default values
are stored on the company and are use for the creation of cash journals
if no values are provided.

TASK-ID: 1934784
2019-07-23 07:41:20 +00:00
Remi Rahir 4968eb7c83 [FIX] sms: update and fix returned IAP state about badly formatted numbers
PURPOSE

Followup of merge 4287481 .

SPECIFICATIONS

wrong_format_number is actually now called wrong_number_format. This commit
propagates this renaming through SMS code and tests.

LINKS

Task 1922187

closes odoo/odoo#35025

Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2019-07-23 08:29:15 +00:00
Remi Rahir 17679bd44c [FIX] sms: fix some issues in SMS composer
PURPOSE

Followup of merge 4287481 .

SPECIFICATIONS

Display "Missing number" in recipients invalid message when not having
any number to ease user experience;

Use note subtype when logging through composer, like already done in standard
sms API method at 2b7ad217f1a55a0687ba4ec4765bc7777114aac0;

LINKS

Task 1922187
2019-07-23 08:29:15 +00:00
Remi Rahir cce91e35f7 [FIX] sms: fix some issues in JS widgets
PURPOSE

Followup of merge 4287481 .

SPECIFICATIONS

Correctly reload after sending SMS;
Correctly re-render the typing widget for SMS.

LINKS

Task 1922187
2019-07-23 08:29:15 +00:00
Remi Rahir e20c1b6eff [FIX] sms: fix some typos
PURPOSE

Followup of merge 4287481 .

SPECIFICATIONS

Notification type is now a selection -> use 'sms' instead of True;
Fix typo in method renaming not correctly propagated to its view;

LINKS

Task 1922187
2019-07-23 08:29:15 +00:00
Thibault Delavallée 0cc6390db5 [FIX] sms: do not display popover for void notification
PURPOSE

Improve SMS UX integration. Followup of merge 4287481 .

SPECIFICATIONS

Fix recent SMS merge: do not display tooltip / popover about SMS information
in chatter if there was no recipients linked to the SMS message.

LINKS

Task 1922187
2019-07-23 08:29:15 +00:00
Simon Lejeune 7ef11e3c96 [REF] stock_account: valuation layer and not admin user
Carefully sudo when necessary.

task-2034044

closes odoo/odoo#34802

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-07-23 08:36:31 +00:00