Commit Graph
106440 Commits
Author SHA1 Message Date
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
David Monjoie fc53108c65 [FIX] base: fix tz onchange in user preferences view
Since res.users is an inherits of res.partner, the onchange that
should be triggered by tz to update tz_offset is not triggered.

Considering tz_offset is never used on res_partner and is only
used by the timezone_mistmatch widget which compares the offset
with the one of the browser timezone, which only makes sense if
you are a user, we could have completely moved this field on
res.users. That being said, it feels strange to have a tz field
defined on partner but having to be a user to compute the actual
timezon offset, which doesn't need any additional information.

For this reason, we chose to duplicate it until either we decide
to truly move it in the next version, or the orm is fixed to
correctly trigger the onchanges of the inherits models.

This patch could be applied in 9.0 if needed, but considering
nobody ever complained about this issue and the "workaround"
nature of this fix, we decided to apply it in master only.
2016-09-02 12:08:42 +02:00
Martin Trigaux 4b5398f53a [MERGE] avoid writing on related fields
and the bad computed & required & default combinaison
2016-09-02 12:04:02 +02:00
Martin Trigaux 80aa17aac7 [FIX] note: properly set the default method
stage_id is comptued and based on stage_ids
The default value should be put on stage_ids, not stage_id, it has the same
effect but avoids an unecessary chain update.
2016-09-02 12:03:41 +02:00
Martin Trigaux 583e92b18e [FIX] remove default attribute on computed field
Which is useless when there is no inverse method
2016-09-02 12:03:41 +02:00
Martin Trigaux d676f2a46f [FIX] account: avoid updating related field
The account.move has already self.date for the date field (cf the method
`_prepare_reconciliation_move`). As the field date on the account.move.line is
a related, it makes useless updates to write it here.

Same issue for journal_id field
2016-09-02 12:03:41 +02:00
Martin Trigaux 2293c2fe1a [FIX] hr_expense: do not write on related field
ref is a related set on the account.move. Writting on the line set the same
reference for all the lines and the parent move (the one of the last line).
Instead put it on the move if there is only one reference or do not put a wrong
one if we can't determine one.
2016-09-02 12:03:41 +02:00
Martin Trigaux c368f7dd21 [FIX] base,hr_expense: unrequire computed field
Which does not make sense. it's the computation that should set the value.
Also the default is no longer needed.
2016-09-02 12:03:41 +02:00
Martin Trigaux caeff5711b [FIX] hr_expense: do not not update related field
journal_id is a related field that was set just before
2016-09-02 12:03:40 +02:00
Martin Trigaux fe2c11f397 [IMP] account: clean create method from mandatory variable
Avoid setting a value for a related field as it will trigger onchange update.
This code was relevant when the date was different on the move and the line but
is no longer needed.

Remove all the `if vals.get(mandatory_field)` to simplify this method and remove
dead code or condition always true.
2016-09-02 12:03:40 +02:00
Martin Trigaux 7ad9487a83 [IMP] account: remove required attribute on stored and related field
The field journal_id and date are both required on account.move and are stored
related on account.move.line.
Setting the required on the account.move.line allows to make it required in the
views or for the ORM but in practice it will be same as it's required on the
parent.

Making it required is a performance killer as it forces to specify a value for
the create which will retrigger an update on the parent move.
This means that adding a line with a date value on an account.move with already
10 lines will trigger 11 updates (date of the new line -> date of the move ->
date on the 10 existing lines), even if the value has not changed.
2016-09-02 12:03:40 +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
Mansi Gandhi 14f07cb96f [IMP] website_quote: Notification 'viewed by customer' should be received by the responsible only
Currently some customers receive the automatic notification 'Quotation
viewed by customer'. This should not be the case as this notifciation
is purely internal and should only be sent to the quote responsible.

Notification is now a note with the responsible being directly in the
recipients.
2016-09-02 11:45:23 +02:00
Christophe Matthieu cdaee93f7f [FIX] web_editor: odoo.define can be undefined if not in edit mode
Commit 933949085d added the odoo variable
definition in the iframe template so the condition which checked if
odoo.define is available had to be adapted.
2016-09-02 11:27:29 +01: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
Fabrice Henrion 743743db28 [IMP] payment: wording for auto_confirm selections 2016-09-02 11:11:29 +02:00
Pierre Masereel 6b4ca99881 [FIX] product: move purchase_ok field in product module
The 'purchase_ok' field has been moved into the 'purchase' module in
rev https://github.com/odoo/odoo/commit/e945b86d5a61e53a9104ab6cc4ed4a1c060587e4 and removed from 'product'
module in rev https://github.com/odoo/odoo/commit/fee03009cfcc41d108a79a2380912f21bc825d77 to fix a duplicated field.
But it should actually stay only in 'product' module because the field
is needed in the 'account' module which doesn't depend of 'purchase'.

So to fix it we set back the 'purchase_ok' field in the product module
as it was originally in the rev https://github.com/odoo/odoo/commit/e23e018285b17450af97cf93165704926f8248db
2016-09-02 11:03:16 +02:00
qsm-odoo 58153ea0ec [FIX] web_kanban: correctly handle nocontent grouped kanban
The nocontent message was never there when the kanban had no content
in grouped mode and the create button was muted even if no column can
be added. Also it was wrongly displayed in ungrouped mode.
2016-09-02 10:57:29 +01:00
qsm-odoo 2f8d1ec5e8 [FIX] web_kanban: t-att(f)-class for kanban buttons
The pre-processing of kanban qweb templates dropped the t-att(f)-class
of button and tags with a valid type attr (object, action, ...).
2016-09-02 10:57:29 +01: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
Thibault Delavallée 168b1e87c0 [MERGE] various: replace workflows by integrating them in models
Workflows are removed and replaced by python code directly embeded in model
files. There are several reasons to do this

 * most of workflows are simple state machines. They simple go from state to
   state under simple conditions. Short circuits exist allowing to bypass
   part of the flow, like cancelling a record. However it is easier to
   understand a flow composed of several simple methods than having to
   understand the workflow in a separate xml file
 * workflows are hard to debug and modify. Each modification require a small
   migration. Moreover ensuring records are not blocked or that there does
   not exist unreachable states is hard to do.
 * having all business code in models helps understanding the business code.
 * most of our flows are quite simple and does not require a complex machinery
   to reflect it

Workflow engine itself is kept. Lot of people use it and it can be very
useful in some cases, notably in modeling more complex flows. Removing it
is therefore not planned in this task.
2016-09-02 10:46:11 +02:00
qsm-odoo 30117517fa [FIX] website: correct snippet structure of .s_title
Commit 744cd64b53 re-added the removed
col system in the title snippet but did not respect the odoo structure
which is section > .container [> .row > .col-*] and put the container
class directly on the section. With this method, when changing the
background of the snippet, only the container part is filled
with background.
2016-09-02 10:35:24 +01:00
qsm-odoo c227b8fd88 [FIX] web_editor: remove some defaults in text edition
* On firefox, you had to click twice on a link to be able to start
typing text
* When selecting text which contained a <br/>, you were not able to
replacing it correctly (you had to click again before starting typing)
* When replacing a whole paragraph content which was below a title,
the text was not replaced and you had to click again and the title
transformed into a paragraph.
* ...
2016-09-02 10:04:58 +01:00
qsm-odoo 8c0c308eca [FIX] web_editor: correct return value of saveElement 2016-09-02 10:04:58 +01:00
qsm-odoo 48a1eaf792 [IMP] website: make the welcome message fit the whole page height 2016-09-02 10:04:58 +01:00
qsm-odoo 5a71cc6bdc [REF] web_editor: lint and simplify JS code 2016-09-02 10:04:57 +01: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
Denis Vermylen (dve) bc8d5dbf2c [REF] account: replace workflow by python code 2016-09-02 10:16:49 +02:00
Denis Vermylen (dve) 6a8e4c6119 [REF] hr_holidays: replace workflow by python code 2016-09-02 10:16:49 +02:00
Jainik Patel c459a908a7 [REF] account_budget: replace workflow by python code 2016-09-02 10:16:48 +02:00
Denis Vermylen (dve) 6ec13d5f36 [REF] hr_payroll: replace workflow by python code
remove workflow and replace by python code.
note: hr.payslip states are messy, 4 states are defined, 3 are used
      and 5 exist.
2016-09-02 10:16:48 +02:00
Denis Vermylen (dve) ec01c4b089 [REF] hr_timesheet_sheet: replace workflow by python code
Note that to copy the workflow, just after creating the state is updated
to draft. The 'New' state is not used anymore in the flow. It could
probably be cleaned. However in this task we only remove the workflows
without changing their behavior to avoid unwanted side effects.
2016-09-02 10:16:48 +02:00
Denis Vermylen (dve) 74538fbc4b [REF] marketing_campaign: replace workflow by python code
guidelines of naming the methods action_* not followed,
this module is being reworked in enterprise and removed
from community anyway.
2016-09-02 10:16:48 +02:00
Denis Vermylen (dve) 82408e09ab [REF] point_of_sale: replace pos.order and pos.session workflows by python code
pos.order note: no verification of current state on action_pos_order_[state]
as these methods already perform their own verification.
2016-09-02 10:16:47 +02:00
Denis Vermylen (dve) 1a394b5b9e [REF] mrp_repair: replace workflow by python code 2016-09-02 10:16:47 +02:00
Denis Vermylen (dve) 8dd5af673a [REM] account_voucher, purchase, mrp_byproduct: remove dead code
purchase, mrp_byproduct: remove unused tests

account_voucher: removed unused method in account_voucher that was still
refering a removed workflow.
2016-09-02 10:16:47 +02:00
Thibault Delavallée 7d09971a35 [FIX] various: remove calls to workflows removed a long time ago 2016-09-02 10:16:39 +02:00
Denis Vermylen (dve) b769b66f51 [FIX] calendar: fix call to get_recurrent_ids broken when migrating
get_recurrent_ids is a multi method. Model should be browsed before calling
the method.
2016-09-02 10:14:30 +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
Yannick Tivisse 98675d3919 [IMP] project: Replace 'Cumulative Flow' by a fovorite filter in task report
This report is too advanced and/or complex to be a single menuitem. Furthermore the model was a mess and a horn of plenty for bugs.

The class ProjectTaskHistoryCumulative inherits from the class ProjectTaskHistory, and create a view based on the same model.The orginal class defines a compute field 'end_date' which calls a compute method '_compute_end_date' that will either make a simple assignment or a SQL request if the columns is always opened or folded.

As ProjectTaskHistoryCumulative is declare with '_auto=False' the compute method will try to write on this table, which is obviously wrong because we are trying to write on a view.

This leads to erors when trying to edit a project stage like:

OperationalError: cannot update view "project_task_history_cumulative"
DETAIL:  Views that do not select from a single table or view are not automatically updatable.
HINT:  To enable updating the view, provide an INSTEAD OF UPDATE trigger or an unconditional ON UPDATE DO INSTEAD rule.

or when trying to delete a column which already contains some tasks.

So we removed this these models and view and replaced them by a simple favorite filter in the Tasks Reports
2016-09-02 08:46:33 +02:00
Yannick Tivisse 07ae5c57eb [IMP] pad: Display an user friendly message on pad configuration view 2016-09-02 08:46:33 +02:00
Yannick Tivisse 153caf54ba [IMP] project: Remove obsolete filters 2016-09-02 08:46:33 +02:00
Yannick Tivisse bfa98c718d [IMP] project: Don't display onboarding data tasks while the project is archived 2016-09-02 08:46:33 +02:00
Yannick Tivisse ed0c151222 [IMP] project: Display the favorite icon front of the project card 2016-09-02 08:46:33 +02:00
Fabien Pinckaers 744cd64b53 [IMP] website: usability non-block snippets at the end
[IMP] website: fix tooltip position to avoid horz scrollbar in div
2016-09-01 23:14:43 +02:00
Fabien Pinckaers 76c327a09e [IMP] website: simplify comparisons building blocks 2016-09-01 22:35:48 +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
Pierre Masereel fee03009cf [FIX] product: remove duplicated field product.template form view
When the purchase model is installed, there are two checkbox with
label 'Can be Purchased'. This error is due the rev https://github.com/odoo/odoo/commit/e945b86d5a61e53a9104ab6cc4ed4a1c060587e4
where we moved purchase related fields from module product to an
inherited view in purchase module.

To fix this, we removed the 'purchase_ok' field that was left in
the product_template view.
2016-09-01 17:24:38 +02:00
Vipul Bhatt c3f81c527d [FIX] product: error during migration
Barcode, default_code (Internal Reference), standard_price,
volume, weight fields are not saved when we create a new product.

This is due to the fact that these fields need the product_variant_ids
field to be set, in order to compute their values.

Due to migration in rev https://github.com/odoo-dev/odoo/commit/1aa5bc0fdfa402ac7cccbc3a7203ec5050f6339b
2016-09-01 17:20:26 +02:00
Martin Geubelle e59a7fe3ff [REF] web_editor, website: move ACE editor to web_editor 2016-09-01 17:15:01 +02:00