Commit Graph
104385 Commits
Author SHA1 Message Date
Yannick Tivisse c85b6ccbd0 [FIX] hr_expense: Allow line modifications on refused expense report
Issue: An employee submits an expense report and this report is refused by the HR or the accountant (Wrong amount, one line will not be paid,...). Currently the expense fields are readonly except in draft state. In our case, the employee is unable to modify a line and resubmit the expense report.

This fix remove the readonly state on the expense line in refused state.
2016-09-09 08:36:31 +02:00
Damien Bouvy 23d8ab5ec9 [FIX] rating: use t-att-value instead of t-esc to display textarea
When using t-esc, if the value is False/not set, the element is not
added to the DOM. Therefore the page asked for feedback but never
actually displayed a textarea input.

Using t-att-value simply prefills the input.
2016-09-07 11:59:14 +02:00
Damien Bouvy 259cc9a708 [FIX] rating: fetch the rated partner when applying the rating
A function named rating_get_rated_partner_id is there, let's use it.
2016-09-07 11:44:42 +02:00
Christophe Simonis 69991e0654 [FIX] marketing_campaign: call super() using kwargs
Without this patch, the new-api/old-api adatpter will invert the
context and count attributes (takes always the context as last positional
argument). This lead to having the count argument being the context,
always returning the count of elements.
2016-09-06 15:55:22 +02:00
qsm-odoo fa3f529d80 [FIX] web_editor: stop resetting bg image of parent snippet on color change
Commit 404ed0f788 tried to solve the
problem but only solved a part of it. Indeed, if the snippet child
has a bg color option but not a bg image option, the event propagation
stops in the parent handler, when it is too late.

Solution is checking that the event comes from the same element on
which the callback is attached to.
2016-09-06 13:00:56 +02:00
Martin Trigaux 6e61ea2256 [I18N] update saas-12 translations by merging 9.0 and master
Without fuzzy-matching that is too flexible and error prone.
Was matching on wrong source and got translation without '%s'
2016-09-06 10:03:09 +02:00
Christophe Simonis 476cb5a090 [MERGE] forward port branch saas-11 up to a989680 2016-09-02 18:01:42 +02:00
Hparfr a989680b60 [FIX] stock: remove eval from search method
Using a safe_eval is overkill and can nicely be replaced by operator

Closes #13138
2016-09-02 17:40:07 +02:00
Hpar 627d78b34f [CLA] Update akretion
+ hparfr
2016-09-02 17:27:48 +02:00
Christophe Simonis 55d2e4b7cf [MERGE] forward port branch saas-11 up to bde7f88 2016-09-02 17:23:34 +02:00
Christophe Simonis bde7f883b7 [FIX] stock: fix error introduce during previous forward-port 2016-09-02 17:02:05 +02:00
Christophe Simonis 54e5bbdf35 [MERGE] forward port branch saas-10 up to 897b9b8 2016-09-02 16:28:28 +02:00
Simon Lejeune a13c15fd44 [FIX] crm: merge partner wizard, traceback on close
In the merge partner wizard, there's a button in the footer which
trigger the method `action_close`. This method is decorated by
an api.multi and begins with an ensure_one() and if you click
on close directly after opening the wizard, self.ensure_one
fails.

The thing is, `action_close` only return an ir.action.act_window_close
action and there's a special attribue you can set in the form
view button to make it return an ir.action.act_window_close directly.
If we use this technique, then there's no traceback anymore. So this
is the fix.
2016-09-02 15:31:40 +02:00
Christophe Simonis 897b9b8fc0 [MERGE] forward port branch 9.0 up to cb1ae53 2016-09-02 15:19:39 +02:00
Christophe Simonis cb1ae535f6 [MERGE] forward port branch saas-6 up to ddcd2e7
Empty merge as 7bdd4de805 has already
been forward-ported with 33167a1eb5.
2016-09-02 14:53:23 +02:00
qdp-odoo 33167a1eb5 [FIX] stock_dropshipping: fix dropship use case in anglo saxon with perpetual valuation.
OPW: 684742
When using dropship+anglo-saxon+perpetual valuation, there is no journal
move for the delivery to debit outgoing inventory (since the goods don't
transit by an internal stock) but the sale does credit it so there was a
build up in the holding account that has to be moved out manually.
This was also reported in #12687.

The solution implemented is to check if the invoice line is related to
sale order lines having one of its procurement_ids with a purchase_line_id
set. If yes, it means that it is a confirmed dropship and in that case we
don't call to super (we don't create the cost of sale line).

That means that:
* If the procurement is in exception at the customer invoice time, the
behavior will be as it is currently, but it's fine as you don't know how
the procurement will be solved, and it'll be only at the beginning (once
the config is done it shouldn't go in exception anymore). People will have
to manually fix those amounts with a miscellaneous operation.
* users in anglo saxon mode should not use the 'stock interim account
(received)' on supplier invoices for dropshipped goods, but rather use the
COGS directly (sounds to me logical, and that's actually why I wouldn't go
for the solution to create the stock move entries every time even for the
dropshipped goods. That, and the fact that it would pollute the accounting
with useless moves).

This is a forward-port/cherry-pick of 7bdd4de805
2016-09-02 14:47:33 +02:00
Christophe Simonis ddcd2e771b [MERGE] forward port branch 8.0 up to 7bdd4de 2016-09-02 14:29:48 +02:00
qdp-odoo 7bdd4de805 [FIX] anglo_saxon_dropshipping: fix dropship use case in anglo saxon with perpetual valuation.
OPW: 684742
When using dropship+anglo-saxon+perpetual valuation, there is no journal move for the delivery to debit outgoing inventory (since the goods don't transit by an internal stock) but the sale does credit it so there was a build up in the holding account that has to be moved out manually. This was also reported in #12687.

The solution implemented is to check if the invoice line is related to sale order lines having one of its procurement_ids with a purchase_line_id set. If yes, it means that it is a confirmed dropship and in that case we don't call to super (we don't create the cost of sale line).

That means that:
* If the procurement is in exception at the customer invoice time, the behavior will be as it is currently, but it's fine as you don't know how the procurement will be solved, and it'll be only at the beginning (once the config is done it shouldn't go in exception anymore). People will have to manually fix those amounts with a miscellaneous operation.
* users in anglo saxon mode should not use the 'stock interim account (received)' on supplier invoices for dropshipped goods, but rather use the COGS directly (sounds to me logical, and that's actually why I wouldn't go for the solution to create the stock move entries every time even for the dropshipped goods. That, and the fact that it would pollute the accounting with useless moves)
2016-09-02 14:13:17 +02:00
Christophe Simonis 1be64ca7db [MERGE] forward port branch saas-6 up to 490f9cf 2016-09-02 14:04:24 +02:00
Christophe Simonis 490f9cfe7e [MERGE] forward port branch 8.0 up to 2559b2c 2016-09-02 14:02:43 +02:00
Christophe Simonis 8a4635a4e2 [FIX] project{,_issue}: mark related fields as readonly 2016-09-02 13:58:27 +02:00
Nicolas Martinelli 1bcbca4be3 [FIX] web: statusbar click
When the statusbar is clicked, a `debounce` function prevents a
doucle-click, and therefore making several `write` calls. In debug
mode, the click doesn't work anymore.

For some mysterious reason, the event is propagated to the parent. The
`currentTarget` is not the `li` element, but the parent `ul`. By
setting the `immediate` argument to `true` (execute the first function
instead of the last), this solves the issue.
2016-09-02 12:46:10 +02:00
Nicolas Martinelli cf4cda2bca [FIX] payment_paypal: set Paypal if not website installed
Since commit 2ab68047, the Paypal link can be sent in an invoice as it
was the case before. However, in order to be able to save the Paypal
account in the accounting settings, the Paypal account must be
website-published. If the module `website_payments` is not installed,
this is not possible.

We remove this condition, since it should be possible tu use the Paypal
payment method without installing the whole website.

opw-686216
2016-09-02 11:56:00 +02:00
qdp-odoo 97da3b99b7 Revert "[FIX] purchase: fix dropship use case in anglo saxon with perpetual valuation."
This reverts commit a57b10dbd5. This has to be fixed in 8.0, and moreover it uses fields defined in sale only so the fix must be done in stock_dropshipping module
2016-09-02 11:36:44 +02:00
qdp-odoo a57b10dbd5 [FIX] purchase: fix dropship use case in anglo saxon with perpetual valuation.
OPW: 684742
When using dropship+anglo-saxon+perpetual valuation, there is no journal move for the delivery to debit outgoing inventory (since the goods don't transit by an internal stock) but the sale does credit it so there was a build up in the holding account that has to be moved out manually. This was also reported in #12687.

The solution implemented is to check if the invoice line is related to sale order lines having one of its procurement_ids with a purchase_line_id set. If yes, it means that it is a confirmed dropship and in that case we don't call to super (we don't create the cost of sale line).

That means that:
* If the procurement is in exception at the customer invoice time, the behavior will be as it is currently, but it's fine as you don't know how the procurement will be solved, and it'll be only at the beginning (once the config is done it shouldn't go in exception anymore). People will have to manually fix those amounts with a miscellaneous operation.
* users in anglo saxon mode should not use the 'stock interim account (received)' on supplier invoices for dropshipped goods, but rather use the COGS directly (sounds to me logical, and that's actually why I wouldn't go for the solution to create the stock move entries every time even for the dropshipped goods. That, and the fact that it would pollute the accounting with useless moves)
2016-09-02 10:48:43 +02:00
Nicolas Martinelli 2559b2cf4f [FIX] web: statusbar click
When the statusbar is clicked, a `debounce` function prevents a
doucle-click, and therefore making several `write` calls. On some status
bars, clicking doesn't work anymore.

The reason is because, in some mysterious cases, the event is propagated
to the parent. The `currentTarget` is not the `li` element, but the
parent `ul`. By setting the `immediate` argument to `true` (execute the
first function instead of the last), this solves the issue.
2016-09-02 10:27:41 +02:00
Nicolas Martinelli d88aa539d4 [FIX] purchase: picking list
When a product is returned after receiving, the return picking doesn't
appear in the corresponding PO.

opw-686895
2016-09-02 09:12:37 +02:00
Denis Ledoux 35104ee360 [FIX] account: fix reset to draft report deletion
When removing the "Save as Attachment Prefix" field
of the Invoice report (`account.report_invoice`),
it was no longer possible to reset the invoice to draft

opw-687130
2016-09-01 18:12:44 +02:00
Christophe Simonis 9dc5ee4007 [MERGE] forward port branch 8.0 up to 7b93e1d 2016-09-01 15:46:03 +02:00
Christophe Simonis 74ff1a50fa Revert "[FIX] payment_paypal: missing Paypal link"
Since 85bcd6fdd8, the field `paypal_account`
has been removed. The field `paypal_url` cannot be computed correctly
anymore.

This reverts commit 2ab68047c1.
2016-09-01 15:36:55 +02:00
Josse Colpaert ea954e4a92 [IMP] mrp: active_move_lot_ids needed on stock_move as well, not just on workorder
As you open the lots in a raw material move in a production order,
you should not see the temporary stock move lots from the work order.
Also the quantity_done should not take into account those.  They will
when they press 'Done' on the workorder.

When posting inventory, the temporary stock move lots on the workorder,
should be transferred to the split move.

For splitting and unreserving, some optimizations are done.
2016-09-01 15:34:21 +02:00
Christophe Simonis 198c080b35 [FIX] payment_paypal: do not compute field paypal_url
Since 85bcd6fdd8, the field `paypal_account`
has been removed. The field `paypal_url` cannot be computed correctly
anymore. Convert it to a dummy field.
2016-09-01 15:31:18 +02:00
Pierre Masereel 665bb3cb62 [FIX] web: correctly redirect after database creation
When a database is created, we are not auto-logged in to the new
database anymore because the login passed to the authentication request
is 'admin' instead of the one set in the creation form.

To fix this issue, we used the login parameter from the creation form
in the authentication request. We also set the login field to
required in the create database form view.

This bug comes from rev https://github.com/odoo/odoo/commit/903733a32
2016-09-01 15:23:57 +02:00
Nicolas Martinelli 6e8f1d111d [FIX] purchase: rounding in anglo-saxon
When anglo-saxon accounting is enabled and the valuation of a product is
'real_time', rounding errors might occur in the price difference between
the invoice price and the product price. It occurs when the product
price precision is larger than the accounting precision.

To avoid these rounding errors, we calculate the difference as the
difference between the price before update and the price after update.

opw-686730
2016-09-01 13:33:30 +02:00
Nicolas Martinelli 2d21795228 [FIX] stock: serial number
- Activate the option "Track Lots or Serial Numbers".
- Set the outgoing process as 3-step one.
- Create a stockable product for which the tracking is "By Unique Serial
  Number".
- Go to Sales > Sales > Sales Orders.
- Create a Quotation for the created product and confirm it. A picking
  is generated but it is waiting availability.
- You are sure to have this product in stock so you force the
  availability and assign the serial number (001) you want to transfer
  in the operation lot details.
- Validate the picking. By doing this, it creates a negative quant in
  the origin location (WH/Stock) and it creates a positive quant in the
  destination location (WH/Packing Zone). The two quants are linked to
  each other.
- Go to Inventory > Inventory Control > Inventory Adjustments.
- Create an inventory in WH/Stock  for all products and set it in
  progress.
- You want to correct the negative quantity you have so set the real
  quantity of product B to 0.
- Validate the inventory and you get the following warning: "The serial
  number 001 is already in stock.Otherwise make sure the right
  stock/owner is set".

We should allow a quantity larger than 1.0 temporary, so it allows the
system to reconcile the quants.

opw-685825
2016-09-01 11:06:37 +02:00
Denis Vermylen (dve) c7a2503326 [FIX] theme_*: restore category to theme
category was changed to "Website" so it'd appear under the website
category in the store, but it needs to be "Theme" otherwise it doesn't
appear in the "Choose your theme" menu after installing website.
2016-09-01 10:24:33 +02:00
Olivier Laurent 24ca4396ef [IMP] doc: add section about SFTP server access
And correct a few errors.

Closes #13350
2016-08-31 16:18:10 +02:00
Nicolas Lempereur 40ceda20eb [IMP] web: pivot don't repeat total header 2 times
opw-687243
2016-08-31 15:56:34 +02:00
qsm-odoo 404ed0f788 [FIX] web_editor: do not propagate event communication between
background and color snippet options

The background and color snippet options communicate so that if a
color is set while a background is already set, the backgrond is
removed. The problem is that the event propagation was not stop
so if a snippet had a background and one of its child set a color,
the background was removed.
2016-08-31 15:28:15 +02:00
Nicolas Lempereur 3d3f9ed980 [FIX] tools: fix guess_mimetype coming from libmagic
Since 5a9e1af64 our guess_mimetype accepted a `default` named argument.

This commit fix the use of library used instead of our implementation, so
we don't get an error from an unexpected argument when having python-magic
installed on a given server.

Since python-magic functions always return a default mimetype:

- empty content: application/x-empty
- text content: text/plain
- binary content: application/octet-stream

the guess_mimetype default argument is not used with python-magic
implementations.

closes #13343
opw-687354
2016-08-31 13:11:45 +02:00
Nicolas Martinelli 372395c745 [FIX] stock: owner of quants
When an owner is defined on a quant, the current behavior is to to allow
only the owner to use it. This is restrictive for internal transfers:
when a quant is owned by Partner A, only a picking with owner Partner A
can select it.

The fix is to make things a bit less restrictive: when a quant is owned
by Partner A, a picking without owner or with Partner A as owner can
select it.

opw-687207
2016-08-31 11:51:49 +02:00
Yannick Tivisse a10fe123e7 [FIX] project: ir.model.access rules
2 rules were defined with the same id thus only one was loaded in
database, resulting in missing read access on model
'project.task.history.cumulative'.

This patch fixes the ids of these rules and clarify their names
2016-08-31 11:22:32 +02:00
Damien Bouvy ccc9dae47e [FIX] account: return correct values for default call
In the new API, default calls are supposed to return recordset
(even empty recordset), not bool values for relationnal fields.

If the table for this model was already present and if no l10n_x
was installed, no default value could be computed correctly for
existing entries. This caused a crash on install.

opw-683470
2016-08-31 11:13:03 +02:00
Nicolas Martinelli 7b93e1dc7b [FIX] l10n_be_intrastat: skip EXTXVAL=0
An entry with EXTXVAL=0 should not be included in the Intrastat
declaration, otherwise it is rejected.

opw-686201
2016-08-31 11:02:48 +02:00
Pierre Masereel 78f4cf0e3c [FIX] project: history cumulative bad compute inherit
When we were trying to delete a stage in project where there were
some tasks, an error was raised because of the 'project.task.history.cumulative'
records that inherit 'project.task.history' which have a compute method on
on end_date.
To fix this, we set the 'compute' attribute to 'None' and the readonly
'attribute' to 'True'.
2016-08-31 10:19:52 +02:00
Simon Lejeune 402ac6b91c [FIX] project_issue: issue: correctly set stage_id during onchange project_id
If you create an issue when `default_project_id` is set, the stage_id
is initialized at the lowest sequence of the stages of the project,
which is normal. However, when you change the project of the task,
the stage_id was not correctly reset. If you save at this time, you
add the selected stage in the project.

Also, the stage_id was not correctly cleared if you remove the project.
2016-08-30 18:15:34 +02:00
Simon Lejeune 48f370c6ce [FIX] project_issue: default stage on issue
If you create an issue directly, the key `default_project_id` is not set
in the context. This key is used to compute the default stage of the
created issue. It is done by creating a domain. Unfortunately, the
domain is always filled with `[('fold', '=', False)]` and thus it
always returns a result that makes no sense when `default_project_id`
is not set. Worse, if you actually create the issue, the found stage
that was not in your project is now a part of it.

The fix is to return no result if the `default_project_id` is not set
in the context.
2016-08-30 18:15:34 +02:00
Simon Lejeune 3041efb655 [FIX] project: task: correctly set stage_id during onchange project_id
If you create a task when `default_project_id` is set, the stage_id
is initialized at the lowest sequence of the stages of the project,
which is normal. However, when you change the project of the task,
the stage_id was not correctly reset. If you save at this time, you
add the selected stage in the project.

Also, the stage_id was not correctly cleared if you remove the project.
2016-08-30 18:15:33 +02:00
jpr-odoo 40c0d542d4 [FIX] website: sign_up page resize
The less code that was resizing the login and sign up form container
in v9 was moved to the login form, but not to the sign up form.
Adding the sign up form class to the less code fixed the size.

It has been done in rev https://github.com/odoo/odoo/commit/5b65befcd889139152c590490fb8965c9f4b5279
2016-08-30 17:27:49 +02:00
Nicolas Lempereur b28cd9034e [FIX] stock: typo report picking operations
Number of columns may have not been equal to the number of columns
headers which would cause an column mismatching since saas-11' 977d1ac.

opw-687147
2016-08-30 16:15:32 +02:00