Commit Graph
102343 Commits
Author SHA1 Message Date
Ryan Cole d3d360ace6 [FIX] doc: typo in deployment
Closes #13387
2016-09-12 15:06:50 +02:00
Nicolas Martinelli dd1eb03af5 [FIX] account: base amount when tax calculated
Commit 8ad0c0f3 introduces back the base amount taken into account for
tax calculation. However, the way it calculates the amount is wrong in
several cases:
- the tax amount is a percentage
- the tax is calculated thanks to Python code

opw-686846
2016-09-12 08:31:47 +02:00
Odoo Translation Bot 043144ce42 [I18N] Update translation terms from Transifex 2016-09-11 00:35:15 +02:00
Christophe Simonis af87c57e51 [MERGE] forward port branch saas-6 up to f98665f 2016-09-09 11:26:15 +02:00
Christophe Simonis f98665f9b6 [MERGE] forward port branch 8.0 up to b17b2a2 2016-09-09 10:52:34 +02:00
Nicolas Lempereur 66de0ea75a [FIX] website_sale: saved shipping country/state
When selectionning a saved shipping address when setting the shipping
address of an ecommerce order, the country and state should be set
accordingly.

unrelated issue noticed when testing e0d4dd01cc
2016-09-09 10:13:28 +02:00
Nicolas Lempereur e0d4dd01cc [FIX] website_sale: toggle shipping state display
In 1ef52c9c the code displaying state of a given country was improved
for some incompatibilities.

But, if when setting the billing informations we choose to create a new
shipping address, the shipping state* would not be displayed even when it
should be (currently, if the shipping country is Australia or U.S.).

opw-687948

*a state being a subdivision of a country
2016-09-09 09:45:00 +02:00
Olivier Dony b17b2a2eb7 [FIX] http: do not allow passing spaces around db in URL param
Until 9.0 our psycopg2 DSN connection strings do not allow having
spaces within the db name, and passing some can cause duplicate
registries to be loaded.

Stripping spaces is a simple workaround until we actually support
spaces within db names.

Fixes #13078
2016-09-09 09:28:10 +02:00
Fabien Meghazi 1d4f2a59e1 [FIX] point_of_sale: bug in decimal.precision lookup 2016-09-08 18:09:05 +02:00
Denis Ledoux 6415e761fa [FIX] note: fix partners images in note kanban
Since 9.0, `message_follower_ids` are
`mail.followers` records,
the partner are in `message_partner_ids`.

Therefore, the partner images displayed in the note kanban
were not the images of the right partners.

opw-688100
2016-09-08 16:32:56 +02:00
Denis Ledoux c86201c553 [FIX] mrp: fix BOM smart button for product variants
Do not force the `search_default_product_id`to the current
product variant, as the domain just above could return a
result, a BOM which is set for the template of this variant
but not for the variant istself, that this filter would hide.

This is following the revision
52cba1b563

Because of this, a product variant smart button could
display "1 BOM", but when clicking on it, none would be displayed,
which is not user-friendly at all.

opw-687912
2016-09-08 16:01:42 +02:00
Martin Geubelle fddd748156 [FIX] account_asset: allow deferred revenue on one month
One could want to use deferred revenue for revenues invoiced in February
but the services are provided in June (e.g.)
2016-09-08 12:24:39 +02:00
Martin Geubelle 7fe89d08b3 [FIX] account_asset: asset in company currency
When the asset is created from an invoice line it should be in company currency and not in invoice currency
2016-09-08 11:21:29 +02:00
Martin Geubelle f5e3a52236 [FIX] account_asset: generated account.move.line name
If `method_time` is set to end, `method_number` is not the reference for the number of depreciation lines.
Take directly the number of depreciation lines is more correct.
2016-09-08 11:19:08 +02:00
qdp-odoo d08c947440 [FIX] account_tax_cash_basis: set the entry date for tax_cash_basis as the maximum of involved operations, instead of the reconciliation date.
Also refactored account_tax_cash_basis and account_tax_exigible to have the minimum code lines in the bugfix module
2016-09-08 10:46:46 +02:00
Nicolas Martinelli a666cd06bd [FIX] point_of_sale: round globally
Commit 06754b32 brings an inconsistency between the PoS frontend, the
pos_order and the account_invoice tax calculation. Part of the commit is
correct since it corrects the matching between the `compute_all`
methods, however.

opw-680891
2016-09-07 13:08:31 +02:00
qsm-odoo e696def3c5 [FIX] website: properly allow to remove slide from banner snippet
Removing a slide was buggy :
* Removing the last slide left the slide handles (and the user had to
click on remove slide again)
* There was an ugly delay before the removal
* Changing the bg image of a slide was not possible anymore once one
slide was removed
* ...
2016-09-07 12:30:40 +02:00
Denis Ledoux d94c449547 [FIX] account: improve usability journal refund sequence
WHen checking `Dedicated Refund Sequence` in a
sale / purchase journal,
the field `Refund Entry Sequence` must be filled with a sequence.

Otherwise, later, when issuing a refund invoice, it won't be able
to generate the number of the refund invoice as it won't be able
to find the sequence to use.

opw-687839
2016-09-07 12:05:07 +02:00
Nicolas Martinelli 06754b3237 [FIX] point_of_sale: tax calculation
Inconsistencies can arise between the tax calculation performed in the
PoS and in the backend (e.g. in a SO). For example:
- Unit price: 9.479
- Tax: excluded, 5.5 %
- Buy 5 units
- Round globally

In the backend, the result is 47.40 + 2.60 = 50.00
In the PoS, the result is 47.40 + 2.61 = 50.01

We make the PoS apply the same logic than in the backend. First, at the
level of the `compute_all` method, especially to use the appropriate
rounding precision before starting the calculation (so we move the
rounding of `total_excluded` after the rounding precision adjustment).
Then, by calculating the taxes amount as the difference between
`priceWithTax` with `priceWithoutTax`. This is mandatory since they
contain the result of `compute_all` in which the rounding logic has
already been applied.

opw-680891
2016-09-07 09:13:03 +02:00
Pierre Masereel 8e65b57df7 [FIX] web, web-kanban: update dataset size at record's drop in a column
When we drag and drop a record in a folded column, the number of elements
in this column displayed  in the column title is not updated.
This issue is present because when a record is droped in a column
its id is not added to the dataset of its new column.

To fix this, we had to add the id of the record in the dataset, and
override the method 'add_ids' in 'DataSetSearch' to have the size
of the dataset equal to the number of ids in it. We have replicated
the behaviour of the function 'remove_ids' in the new function 'add_ids'.
2016-09-06 17:15:44 +02:00
Simon Lejeune 826ee79384 [FIX] web: kanban: click on action in a vignette
It is possible to put a clickable object in a vignette that opens
an action, for example the kanban_status class used in the CRM
pipeline. This thing presents an issue as it opens a wizard, but
when the wizard is closed the vignette is not reloaded.

When you click on this item, it will go through `on_kanban_action_clicked`
in kanban_record.js that will trigger up a `kanban_do_action` custom
event. The kanban_view have an handler for this custom event and
will call the `do_execute_action` method defined on the view.

This method can take a callback as its last argument that will run
when the wizard is closed. Before rev ae583ba1, the behavior was
to reload the entire kanban view but this rev tries to only reload
the kanban record. Unfortunately, it didn't use the argument
in `do_execute_action` but in a then of this method. So it
didn't work. This commit put the onclose callback at its right place.
2016-09-06 17:15:13 +02:00
Denis Ledoux f19d179bb0 [FIX] link_tracker: fix link tracer when no geoip in session
The `geoip` is not always defined in the session,
and therefore one needs to check it's defined before
attempting to use it.

The same is done at different places in the code,
through the different modules.

opw-687783
2016-09-06 12:04:43 +02:00
Martin Trigaux 7970cbe178 [FIX] project_timesheet: remove useless overwrite
It was doing something before but the useful line was removed at 908f4165
The method is no longer useful and can be removed.
It was error prone has it had not the same signature as the one on project.
Fixes #13402
2016-09-06 11:53:44 +02:00
Denis Ledoux e147aac74a [FIX] warning: fix override of product_id_change
Without the @api.multi property,
the method is considered as taking only one parameter (self?),
while it takes multiple parameters.

This prevented to change the quote template on a sale order,
if the quote template had some order lines, due to the below error

`TypeError: product_id_change() takes exactly 1 argument (19 given)`

opw-687797
2016-09-06 11:18:33 +02:00
Nicolas Martinelli 502f22e2ba [FIX] mail: link in chat messages
Commit f30ec302 defines the messages sent thanks to the channels as
plain text. This is true for all cases but one: the notification
(e.g. @user). Therefore, the notifications links are broken.

opw-687781
2016-09-06 10:52:53 +02:00
Ravi Gohil b226510840 [IMP] payment_*: avoid access error on provider model
As provider model is intended to be used internally restricting the read of
some private fields to the employee group avoid creating access issues.
2016-09-06 10:20:41 +02:00
Richard Mathot c208d0e0b2 [FIX] tools: prevent crash of formatLang
From Odoo 9.0, en_US is not always activated in Odoo. As a fallback, if
the search for a language does not find company language nor English US,
we use the first available language (there is always at least one).

In order to reproduce this behavior, eg: you can set the language of
your company's partner to en_US, then load another language, then
disable en_US from your database. Try to open the "Accounting" dashboard
and you will get a traceback.
2016-09-06 09:37:04 +02:00
Goffin Simon e424a9a938 [FIX] account_tax_cash_basis: backport 39d68ac. opw:683625 2016-09-05 14:56:53 +02:00
Nicolas Martinelli ea8d52a460 [IMP] mrp: warning message if unique serial numbers
When consuming products tracked by unique serial number, no check is
done on the quantity consumed for a given serial number. It means that
negative quants might be created without any warning to the user.

We implement a simple warning thanks to a onchange.

opw-687129
2016-09-05 08:39:18 +02:00
Odoo Translation Bot 75a196972e [I18N] Update translation terms from Transifex 2016-09-04 03:06:55 +02:00
Odoo Translation Bot 9f0d3800cc [I18N] Update translation terms from Transifex 2016-09-04 00:36:28 +02:00
Martin Trigaux 9c8d8b90c0 [FIX] models: display all fields of a model
When a model has no form defined, a default view is generated displaying all
fields of the model.
The one2many and many2many fields were not displayed on the form, probably for
aesthetic or historical (2008) reasons.
2016-09-02 15:39:31 +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
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
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
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