Commit Graph
104236 Commits
Author SHA1 Message Date
Josse Colpaert 4f9af6838f [FIX] mrp: use unit_factor when generating lots in work orders and make sure to generate lots when necessary
When (re)generating the stock.move.lots in the workorder,
it should use the unit_factor on the move like everywhere else.
This makes sure we do well with the explosion of phantom boms too.

It is also important that if there is no operation_id given
explicitly in the "consumed in operation" on the bom line,
that it still generates the necessary stock.move.lots in the last work order.

Also, in the work order it is better to set the quantities done already.
That way we don't forget to consume them.
2016-08-26 11:45:44 +02:00
Dhaval Suthar 5cef19c165 [FIX] sale_service_rating: rating of issue
* When an issue was set in stage that has a rating email template
  and that the project was set on 'rating when changing state',
  there was a warning with Failed to render template.
  There was a small error in a condition that fired exception.
2016-08-26 11:35:41 +02:00
Pierre Masereel 4ccc1f9bc8 [FIX] website_sale_digital: fix attachments stat button domain
Due to a syntax error in the domain of product attachement
a traceback was given.
2016-08-25 16:44:30 +02:00
Yannick Tivisse ce4d207741 [MERGE] hr_expense: Usability review + Mail gateway integration with alias_contacs + Fixes
Merge branch 'saas-12-expense-fixes-yti' into saas-12
2016-08-25 16:13:04 +02:00
Yannick Tivisse 3b5d6da5c1 [FIX] hr_expense: Solve several usability issues on the flow
Review the subtypes
===================

- Add a subtype for the paid expenses
- Correct subtypes wording

Prevent expense report for several employees
============================================

- Can add lines from every employee, leading to account issues (payable / receivable)
  Raise an error if you try to report several expenses for different employees

Don't track onchanges on journal_id
===================================

- Expense Sheet, click on Post Journal Entries: you have 2 produced messages, and
  one is strange (Journal Entry: * 1 ?)

Remove useless message on chatter
=================================

- Remove the message to say that the expense report has been validated by ...
  It's redundant as the visibility tracker already logs this change

Remove unused method
====================

- 'refuse_expense_sheets' is declared but never used

Log a link to the payment on chatter
====================================

Expense Sheet, click on Register Payment: you have a message containing the
payment name (SUPP.OUT/2016/0001). Add a link to the form view.

Expense duplication
===================

Do not copy 'sheet_id' on duplication. It's wrong and has as secondary effect
to duplicate the state too.

Expense Report tree view
========================

Display correctly the widget monetary
2016-08-25 16:06:44 +02:00
Yannick Tivisse 47728ccd40 [FIX] hr, hr_expense: Allow employees to send emails to aliases
New feature in mail module
==========================

Currently, an email can be sent to an alias from:
- Everyone
- Authenticated Partners
- Followers

This commit is intended to add another category: Employees
The main purpose of this new feature is to allow employees to send an email
to an 'expense' alias in order to create automatically their expenses with
their mobile phones.

Use this new mechanism in hr_expense
====================================

Currenlty, we're overriding message_new to make a security check and create
an expense if the sender is an employee or bounce otherwise, which is not the
correct way to achieve this. A better way is to use the alias mechanism now
that it has been extended to employees too.

Don't hardcode email_from
=========================

The email_from of the bounce email is hardcoded to "help@odoo.com". I am sure
they will be happy to receive all answers from any odoo instance

Review the bounce email content
===============================

content: Your expense has not been created because your email address is not set
on an employee or on a employee's user. Configure your employee's information correctly and try again.
-> this is a message for the admin, not an employee or anyone else

Now the content is generical for aliase defined for employees.
2016-08-25 14:55:08 +02:00
Yannick Tivisse 920b791ac5 [FIX] hr_employee: Don't create expenses from every email address
This is simply useless and the open door to spam. The inital goal for this
option was to be able to create an expense from any email in the onboarding.
It was even commented with 'Don't use this in production' which is another
point to remove it.

It is wrong because:
- In a saas instance, the employee email = the admin email = the email you
  entered while filling the form. So, if the user sends an email with his phone,
  the expense will be created. If the user sends an email with another email address
  then the expense won't be created but he'll receive an automated email explaining
  that he should register his email address either on it's user information or on it's
  employee information (professional on employee, private on user for example).
- With this modified behavior, if no email address is matching the sender email address
  the system will create an expense with the-first-employee-linked-to-an-user as employee,
  which is totally wrong. Furthermore, the guy that sent the email will not see the created
  expense because it hasn't been assigned to him.
- Everyone can create expenses, I don't even imagine how fast we can overload the database
  with a huge pile of crap
2016-08-25 14:55:08 +02:00
Yannick Tivisse 1bf327d985 [IMP] hr_expense: Reorganize menuitems usability wise 2016-08-25 14:55:08 +02:00
Christophe Simonis 7ca170b511 [FIX] ir_qweb: handle inline css in assets 2016-08-24 12:49:11 +02:00
qsm-odoo 5578d6c79c [FIX] web_tour: prevent crash when checking if trigger "html" is visible
The previous implementation took the parent of the element to begin
the check, which was wrong when the initial element was the html root.

This commit changes the method to a recursive implementation, which is
clearer.
2016-08-24 12:31:52 +02:00
Jeremy Kersten e310d9e1b3 [TYPO] rating: typo in end user view 2016-08-24 12:22:26 +02:00
Joren Van Onder cae2c74985 [FIX] website_{payment,portal_sale}: move code depending on sale
From website_payment to website_portal_sale.
2016-08-24 11:19:15 +02:00
Christophe Simonis 0175d5b9d7 [IMP] base: remove merge_states method on res.partner.state model
This function attempted to deduplicate states with same code in order
to force the unique constraint creation. This is the job of a migration
script and should not be execute at each update.
Moreover, the current implementation is flawed and may lead to crash in
some situations.
2016-08-23 11:24:41 +02:00
Martin Trigaux 133da17faa [I18N] update saas-12 translations by merging 9.0 and master
1. export saas-12 sources terms into .pot files
2. msgcat odoo-9 .po & odoo-master .po into saas-12 .po files
3. msgmerge saas-12 .po with saas-12 .pot files to keep relevant terms
2016-08-22 14:16:52 +02:00
Christophe Simonis 9ad5f26b3f [MERGE] forward port branch saas-11 up to 3a2147d 2016-08-20 17:18:31 +02:00
Christophe Simonis 3a2147d95c [MERGE] forward port branch saas-10 up to bc1a0a3 2016-08-20 16:57:36 +02:00
Josse Colpaert c3665fb5c9 [FIX] mrp_mps, product: we need to be able to calculate stock in the past for the MPS
When calculating the stock quantity fields, we can put a
from/to_date in the context.  This should work in the past too.
We see the to_date as the date in the past to calculate and calculate
backwards from the stock now to the date in the past.
This is done by doing an extra read_group on the stock moves,
with a similar domain except that it takes the moves done from
date_to.
2016-08-19 17:16:18 +02:00
Christophe Simonis bc1a0a32ca [MERGE] forward port branch 9.0 up to 58cbcba 2016-08-19 16:59:29 +02:00
Christophe Simonis 58cbcbae31 [MERGE] forward port branch saas-6 up to 787a32b 2016-08-19 16:35:22 +02:00
Christophe Simonis 787a32bdaf [MERGE] forward port branch 8.0 up to ee846fb 2016-08-19 16:27:06 +02:00
Christophe Simonis ee846fbff8 [FIX] core: exception are made to be raised 2016-08-19 15:59:10 +02:00
Christophe Simonis ef1386a7d2 [FIX] core: correctly load sql file when updating modules
Do not dumbly parse sql queries by splitting on `;`. PostgreSQL will do
a better job than us...
2016-08-19 15:48:36 +02:00
Aristobulo Meneses 5e7d23f1be [FIX] website_slides: Set file size limit to 25MB to match web module limits
This commit closes #13223
This commit closes #13225
2016-08-19 15:34:58 +02:00
Jeremy Kersten 0d491775c5 [FIX] web: don't duplicate alert while backup
When you backup 3 dbs with the database manager, you had 3 times the warning.

Underscore is not loaded, so _.once not available.
This commit closes #13173
2016-08-19 15:34:58 +02:00
Martin Trigaux 0122c05eff [FIX] web: avoid report with invalid sheet name
This commit does not fix any bug in odoo/odoo but helps fixing #12788
Needed for odoo/enterprise#433
2016-08-19 15:28:27 +02:00
Martin Trigaux 99215a02c6 [I18N] update saas-11 translations by merging 9.0 and master
1. export saas-11 sources terms into .pot files
2. msgcat odoo-9 .po & odoo-master .po into saas-11 .po files
3. msgmerge saas-11 .po with saas-11 .pot files to keep relevant terms
2016-08-19 13:54:31 +02:00
Christophe Simonis f571ba373a [MERGE] forward port branch saas-6 up to 826472d 2016-08-19 12:56:08 +02:00
Christophe Simonis 826472dc48 [FIX] account_asset: correct typo in function name 2016-08-19 12:45:11 +02:00
Christophe Simonis e5371329f7 [MERGE] forward port branch 8.0 up to 08ed48e 2016-08-19 12:07:14 +02:00
qsm-odoo 7a77209149 [FIX] web_editor,website: stop closing web_editor dialog two times
This commit fixes two problems:

* Clicking on the save button of a web_editor dialog closed the dialog
two times because the button was created with the flag "close: true"
and binded to a handler which closes the dialog. This also prevented
to extend this handler by placing the this._super call in a deferred.

* Some web_editor dialog extended the save callback but forgot to use
the this._super, which prevents the "saved" event to be triggered
(currently not used anywhere but useful for custo and master).
2016-08-19 09:07:40 +02:00
Martin Trigaux 2331bbf4b0 [I18N] update saas-10 translations by merging 9.0 and master
1. export saas-10 sources terms into .pot files
2. msgcat odoo-9 .po & odoo-master .po into saas-10 .po files
3. msgmerge saas-10 .po with saas-10 .pot files to keep relevant terms
2016-08-18 16:47:23 +02:00
Pierre Masereel 36359f8d3e [FIX] stock: stock_warehouse resupply warehouse
* bad creation of a dictionnary with the dictionary comprehension syntax.
  correction of the syntax.
2016-08-18 15:49:52 +02:00
Goffin Simon acc7449df1 [FIX] stock: action_done with moves with pack operation
When action_done is called with moves without pack operation, the pickings
linked to the computed moves must be in state done and the date_done must
be set on each picking.

opw:685145
2016-08-18 15:10:42 +02:00
Damien Bouvy 08ed48e24c [FIX] stock,purchase: stop shortening picking type names
In purchase, a special key is set in the context to simplify the name
of the picking type: instead of the normal name, only the name of the
warehouse is used. This is problematic if more than one incoming picking
type exists for a given warehouse, as it prevents you from being able to
differentiate them. Asking users to modify the view to remove the
context key seem a bit too much to ask for something that should be
simple.

It is my understanding that this was implemented only for cosmetic
reasons, but I am willing to assume that having to select
"YourCompany: Delivery Orders" instead of simply
"YourCompany" for people who only have one picking type should not
be too disruptive or obscure.

opw-685751
2016-08-18 13:59:42 +02:00
Goffin Simon c0bb312a26 [FIX] warning: Products with Blocking Warnings can still be added to Sales Orders
Like in 8.0 when adding a product with a blocking message in a SO line, a warning
message must be raised and the product is not added.

opw:685928
2016-08-18 13:22:34 +02:00
Goffin Simon 0bfcf65200 [FIX] base: Individual contact gets Company icon
Steps to reproduce:
- Create a contact (Company).
- Create a "child" in this company.
- Select "Contact" as type of address.
- Create an individual child of the company.

Bug: instead of having the Individual icon (Human being), it gets the
Company icon (Building).

Fix: the behavior must be the same as in 8.0, the avatar must be used
for a contact which is not a company.

opw:683105
2016-08-18 11:19:07 +02:00
Goffin Simon c844534f8a [FIX] account_asset: asset depreciation with refund
When an asset is created from a refund invoice, the negative amount
must be taken into account to create the depreciation moves.

opw:685630
2016-08-18 11:11:49 +02:00
qsm-odoo baef529cbd [FIX] web_editor: keep all debug values for FieldTextHtml
Commit 89a4774c21 changed the kwargs
debug value of the FieldTextHtml controller to let it be equal to
"assets" instead of True or False. The problem is that an empty string
was considered True before the commit and False afterwards.

In fact, the original code was wrong and the debug value should equal
the already processed kwargs debug value in the HttpRequest object.
Indeed, the kwargs.debug value is equal to the URL value while the
request.debug value is already processed and is only one of the 3
values: None, True or "assets".
2016-08-18 09:27:05 +02:00
Nicolas Lempereur 06fdc2a6de [FIX] mass_mailing: body editor with translation
Since a324b22d, the mass mailing body editor would:

- save english body in language Y if user had language Y,
- not allow to edit translations in another language

This is due to how html_translate is set as translation function of html
only if the field is set as sanitize==True.

closes #13196
opw-685629
2016-08-18 08:31:24 +02:00
Damien Bouvy 037a152db6 [FIX] project_issue_sheet: hide timesheets tab on issues w/o project
Since it is not possible to create a timesheet entry on a issue without a
project_id, the timesheets page in the form view should be hidden if no
project is set.

This prevents the user from trying to create a timesheet entry on the
issue and receive a not so transparent message like:
mandatory field is not set: [object with reference: account_id - account.id]
2016-08-17 16:37:44 +02:00
Nicolas Martinelli 354017b805 [FIX] mrp: duplicate product code
The BOM Structure report shows the product code twice.

opw-684520
2016-08-17 16:16:29 +02:00
Raphael Collet d32871570a [FIX] base: extrapolate table name on uninstall for ir_model_constraints
When uninstalling a module, the model *may* be removed from the registry
before the removal of the model constraints; to prevent crashing in
those cases, a simple replace('.','_') on the model name should allow to
obtain the table name in these cases.
2016-08-17 15:21:26 +02:00
Nicolas Martinelli 19e556b34f [FIX] website_form: traceback when sending an attachment
The form builder offers the possibility to add a "Custom File Upload"
field. When the user clicks on "Send", an error occurs ("An error has
occured, the form has not been sent.").

This is because we try to send a mail linked to "mail.mail", which
doesn't make sense.

The case was actually taken into account in the code, there was just an
oversight in the code.

opw-684040
2016-08-17 14:52:10 +02:00
Cédric Snauwaert 5b4404f628 [FIX] account: optimize the bank reconciliation widget + add of a button to auto-reconcile instead of auto-reconciling directly when opening the widget.
* This new button is a behavior change, but this is needed for big databases with a lot of statement lines to process. Indeed, in that case we prefer to load the widget as soon as possible and thus let the user process the lines manually or click on that button (but at that time he knows why it takes time).
* Opimization of various method in order to speed reconciliation and view opening : added indexes, direct use of sql queries...and also removed the code that was looping on open debit/credit to propose a sum of entries to match the statement line's amount, because it was a little greedy and wouldn't give accurate results most of the time.
2016-08-17 14:23:08 +02:00
Denis Ledoux 8787476b50 [FIX] web: fix DataSetSearch to avoid race conditions
This is a following of revision
ab8a93c852

This revision solves a new case:
when quickly performing a second search
after one which has not been resolved yet in a kanban view, and the second
search is resolved before the first, it was not possible to load the form
by clicking the card of the kanban, it leaded to a
`Could not find id in dataset` web client error

This was because the ids of the dataset were altered with
the ids of the first search (the one that lasted longer), while
the records displayed were the ones of the second search
(the one that finished first)

opw-682362
2016-08-17 12:26:16 +02:00
Cédric Snauwaert cda132bba5 [FIX] account: fix several problem related to exchange rate entries. Was PR #13162
When an exchange rate entries was created, fields `exchange_move_id` and `exchange_partial_rec_id` were not set on account_full_reconcile. which implies that when unreconciling entries we had the exchange rate entry that was not reconciled with its reversal move.

Another problem fixed is an infinite recursion loop that occured when trying to unreconcile entries with a `full_reconcile_id` and an exchange rate entry that is reconciled with more than one journal item. In that case, the unlink() of account.partial.reconcile has to be done before trying to reconcile the exchange rate entry with the reverse move otherwise as the exchange rate entry is still reconciled with another aml, `amount_residual_currency` is not correct and hence the program tries to create another exchange rate entry and loops.
2016-08-17 11:55:20 +02:00
Martin Geubelle 5fce7847e1 [FIX] purchase: fiscal position in multi-company environments
Properties depends on with which companies the records
are browsed.

When retrieving the fiscal position as sudo (from a cron), we should force
the company from the context.

After https://github.com/odoo/odoo/commit/4162b8f as the context is force in get_fiscal_position,
we should call this method with a company (and not pass the company in the context).
This has been forgot in https://github.com/odoo/odoo/commit/fe92dea

opw-684802
2016-08-17 11:51:50 +02:00
Nicolas Martinelli 717ca3390f [FIX] base_import: error message
During the import of a file, if the connection is closed (timeout,
server shutdown...), a traceback appears.

This is because `error.data.arguments` is not defined in this case.

opw-682104
2016-08-17 11:43:17 +02:00
Martin Trigaux 907f9554d4 [FIX] account: update outdated account.pot file
Fixes #13149
2016-08-17 10:31:25 +02:00
Nicolas Martinelli b82252508b [FIX] hr_expense: remove duplicated code
opw-685933
2016-08-17 10:22:51 +02:00