Commit Graph

94234 Commits

Author SHA1 Message Date
Goffin Simon 503820acb6 [FIX] account, purchase, sale: included taxes
-account:_fix_tax_included_price
If a fiscal position mapped an included tax on a SO or on a PO line
then the price unit of the product must be recomputed.

-purchase: onchange_product_id test
Test that when an included tax is mapped by a fiscal position, the included tax must be
subtracted to the price of the product.

-sale:product_id_change test
Test that when an included tax is mapped by a fiscal position, the included tax must be
subtracted to the price of the product.

opw:647321
2015-08-26 09:02:39 +02:00
Christophe Matthieu b90c663702 [FIX] website: two sliders or galleries can have the same id
(because the user can edit separate part like footer or using versioning)

Backport of 394a0c8bb40ffa6eb080dd9e3bc9bce16db3d6f1.
2015-08-25 17:14:55 +02:00
Denis Ledoux 3b02e3d63d [FIX] sale*: company tax filtering
f26b94f had as goal to filter the taxes of the product
according to the company when the sale.order
was created/edited as SUPERUSER_ID
(Who ignores the record rules).

Unfortunetaly, to filter the taxes,
it used the company of the customer,
while it's actually the company of the order which
should be used.

Indeed, for instance,
partners can be shared among all companies.

It was way less simple to access the company
of the sale.order, this parameter being
not available in the on_change method signature.

This is the easiest way to solve this issue
without breaking the API / retro-compatibility.

opw-647819
2015-08-25 14:52:20 +02:00
Nicolas Lempereur 3e82c94d69 [FIX] point_of_sale,base: use context timezone for sequence
Previously when replacing time related sequence in a prefix or suffix of
a sequence, the timezone used for the time values would always be the
server's timezone.

With this fix, the context timezone is used if available (UTC is used
otherwise).

closes #8159
opw-646487
2015-08-25 14:08:17 +02:00
Martin Trigaux 1f57c9a5a6 [FIX] website_mail: do not reveal full email address in contact name
When subscribing a document, a partner is created based on the email address.
Instead of using the email address as the name (which is a bit too spammer
friendly), only keep the first part of the email address as a name.

Following discussion https://www.odoo.com/groups/59/13640169
2015-08-25 10:02:00 +02:00
Denis Ledoux 2d3973481f [FIX] point_of_sale: Sales details products translations
In the Sales Details report, the products were
not translated in the user language.

opw-647700
2015-08-24 18:27:55 +02:00
Denis Ledoux 802d1abe7a [FIX] account: invoice lines amounts must be rounded when converted to journal items
This revision is related to cfbd086b09.
This is the same use case than above, but with a different
currency than the one of the company, for the field
`amount_currency` this time.

Closes #8135
opw-647639
2015-08-24 18:18:01 +02:00
Denis Ledoux 9a9720ac14 [FIX] sale: in a SO line, changing uom qty must change uos qty
This is a regression from rev.
1cedcf6abb

Not updating the product uos qty on updating the uom qty
is wrong, and it has multiple side-effect.

The SO line margin not being correctly recomputed
when changing the quantity is one of them.

opw-647902
2015-08-24 18:07:24 +02:00
Goffin Simon 6947313cd0 [FIX] purchase: customer lang
Introduced by f7f18ba5b1
The lang of the customer must be used.
In the drop shipping use case (order.location_id.usage == 'customer'), the customer
is in the destination address of the order (order.dest_address_id).

opw:647628
2015-08-24 11:37:09 +02:00
Denis Ledoux 772112e8d0 [FIX] stock: warehouse rename with missing operation types
It wasn't possible to rename a warehouse if one
of its picking types (except `In Type`) was
not set

opw-647815
2015-08-24 10:15:20 +02:00
Goffin Simon 256978195b [FIX] website_mail: action_edit_html
Introduced by 9abf7a2010
When clicking on the many2one edition button of the field "email_registration_id"  in the
"event.event" view form, the return action id was not available in the action.

closes #8147
opw:647698
2015-08-24 09:11:00 +02:00
Odoo Translation Bot 99931637d5 [I18N] Update translation terms from Transifex 2015-08-23 01:51:13 +02:00
Christophe Simonis 86f98d5144 [MERGE] forward port of branch saas-3 up to 04e1318 2015-08-21 16:18:20 +02:00
Christophe Simonis 04e13180c9 [MERGE] forward port of branch 7.0 up to 607114f 2015-08-21 16:08:27 +02:00
Goffin Simon d98f1ef0e7 [FIX] account_bank_statement: reconciliation line
The propositions of reconciliation for a bank statement line must
be taken from account move lines with the same partner_id of this
bank statement line or without partner_id.

opw:647199
2015-08-21 09:26:18 +02:00
Christophe Simonis 7349e23837 [FIX] models: correct ORDER BY onm many2one fields
Now the we follow many2one when generating ORDER BY, we need to keep
track of visited relations to avoid loops.

Closes #8114
2015-08-20 11:44:04 +02:00
Goffin Simon f7f18ba5b1 [FIX] purchase: description of a product
When a move is creating from a purchase order line and the destination
of the order("location_id") is "customer", the description of the created
move must be the name of the product. To avoid that the supplier description
of the product appears on the customer invoice because in "drop shipping",
the customer invoice line is created with this created move by the function
"_get_invoice_line_vals".

opw:647628
2015-08-20 11:24:53 +02:00
Nicolas Lempereur 0ea89c10b6 [FIX] web: keep hash when login redirect
The anchor part of the url should be kept when a login redirect is done.

introduced by 8f3f9ef46b

note: for 8.0 and saas-6
2015-08-20 11:09:23 +02:00
Denis Ledoux cfbd086b09 [FIX] account: invoice lines to journal entries currency rounding
When converting an invoice in journal entries,
the invoice lines amounts must be currency rounded
not only when the invoice currency is different
than the company invoice,
but also when they are the same.

Otherwise, a rounding issue can happen
if the `Account` decimal accuracy is greater
than the currency rounding, the journal entries
total and the invoice total could be different.

e.g.
 - Set decimal accuracy of Account and product to 4
 - Create a supplier invoice, any supplier
 - Add a line as follow:
   - Product: None
   - Quantity: 2057
   - Price unit: 11.9150
   - Tax: 16% (create a new tax with 0.16 as percentage)
 - Validate the invoice
 - In the other information tab of the invoice,
   click on the journal entry
 - Notice that the first line has as credit amount 28430.6150
   While the invoice total is 28430.6200
 - Now if you try to create a bank statement with one line
   of -28430.6200 and as partner the supplier you chose
   in the second step of this explanation, and try
   to reconciliate it to the invoice created above,
   the above won't be marked as paid, while it should.

opw-647639
Fixes #8135
2015-08-19 18:21:00 +02:00
Denis Ledoux 37a2f426a9 [FIX] hr_timesheet_invoice: invoice timesheet of contract with no customer
If there is no partner on the contract to which are invoiced
the timesheets, the error telling you to set a partner (and a pricelist)
must be raised before trying to create the invoice, not before
creating the lines of the invoice.

In this case, this is because if you set no customer
on the contract, there is no pricelist automatically filled
as well, and the currency is took from the pricelist,
which will be False in the case there is no pricelist
on the contract, and you cannot create an invoice
with no currency set.

opw-647672
2015-08-19 14:29:09 +02:00
Florian Hatat 5fe858d7aa [I18N] account: Add overdue_msg to account.pot
The string belongs to the account module, but was wrongly added to
stock.pot. This commit adds it to account.pot, but also keeps it for the
moment in stock.pot to prevent losing existing translations in
Transifex.
2015-08-19 11:07:21 +02:00
Florian Hatat 838b3eb55c [I18N] stock: Remove untranslatable terms from
Mark them as untranslatable to avoid to reexport them.
No need to forward port as these are ignored in v9
2015-08-19 11:04:27 +02:00
Florian Hatat bf41a2a442 [I18N] stock: Add missing terms in stock.pot 2015-08-19 11:04:19 +02:00
Florian Hatat d6d9b0df4e [CLA] flh signs CLA 2015-08-19 11:04:19 +02:00
Denis Ledoux 6af3d1ad32 [FIX] account_analytic_plans: ACL for distribution plan instance
In the standard account_analytic_account module,
the employees have the read access to the analytic accounts.

Therefore, it makes sense to give the read access to the
account distribution plan, so an employee can choose one
in a purchase order when the Analytic Accounts for Purchases
is activated.

opw-647606
2015-08-18 18:44:25 +02:00
Denis Ledoux edd0141ca4 [FIX] purchase_analytic_plans: apply purchase analytic group on analytic account.
When the Purchase analytic plans module is not installed,
the analytic account field in the lines of the purchase order
is available only for the group
`Analytic Accounting for Purchases`

It should be the same for the field of the analytic distribution plan.

Otherwise, it will lead to an access error if you don't, as
you do not have access to the required model.

opw-647606
2015-08-18 18:25:53 +02:00
Guewen Baconnier cadbf1526b [FIX] account_analytic_analysis: contract manager as salesman
Copy the contract's manager to the invoice's manager field when generating
recurring invoice.

Closes #6568
2015-08-18 14:59:04 +02:00
Goffin Simon ad253a3386 [FIX] purchase, stock_dropshipping: origin in PO
When a product is in "dropshipping" with one supplier and with a few SO
created for the same customer, the origin of the resulting PO must
include all the SO names.

opw:647409
2015-08-18 11:01:27 +02:00
Joren Van Onder 41929bd997 [IMP] point_of_sale: posbox_create_image fixes
- set keyboard layout to us
- install GNU screen
- add udev rules to make USB devices accessible to the usbusers group
- setup crontab to delete odoo sessions/*
- define inputrc and vimrc
2015-08-17 21:26:53 +02:00
Laetitia Gangloff 607114ff00 [FIX] stock: Scheduled / Max. Expected date change on picking when changed in its moves
When changing the min_date / max_date in a move,
the date change wasn't propagated to its picking.

The use of store triggers is needed in such a case,
`store=True` isn't enough

Fixes #1862
Closes #3278
2015-08-17 18:04:13 +02:00
Olivier Dony c2cbb75319 [FIX] web: _serve_attachment should not trigger redirect loops
When the Bundle mechanism caches bundle files into the
ir.attachment table, it can sometimes cache an empty
resource file (For example, if a less/saas compiled file
results in an empty CSS file) for the bundle URL.
The appropriate behavior for _serve_attachment()
when the browser loads that bundle URL is to return
an empty file (which is the correct content), instead of
redirecting again to the same URL, triggering a loop.

In addition, this commit removes the special case for
returning 204 No Content. This HTTP status code is not
really meant for GET requests - returning an empty file
with a 304 or 200 code is more appropriate and allows
for normal browser caching.
2015-08-17 17:01:19 +02:00
Maxime Chambreuil b541187345 [FIX] l10n_ca: no attempt to re-create input/output accounts properties
Deleting the properties for the default accounts
in the root product category and then
updating the l10n_ca module leaded to a crash
due to the fact the module tried to re-create
the properties as they were no longer there.

Fixes #3130
Closes #3131
2015-08-17 16:44:09 +02:00
Christophe Matthieu dd4566de37 [FIX] website: remove col-md-12 obsolete bootstrap fix 2015-08-17 10:13:00 +02:00
Odoo Translation Bot 4359f65522 [I18N] Update translation terms from Transifex 2015-08-16 01:58:03 +02:00
Denis Baranov c0c272c4a8 [FIX] mass_mailing: add attachment in mass mailing test
When testing the mass mailing, with the 'Test Mailing'
button, the attachments were just not attached.

Closes #2981
2015-08-14 17:39:22 +02:00
Denis Baranov b8f177ddeb [CLA] IT Libertas corporate 2015-08-14 17:39:22 +02:00
Denis Ledoux 19b5ba2b08 [FIX] website: condition to flag a menu as `active` in the top menu
1. A menu with `/page/website.***` should be flagged as `active`
if the current url is `/page/***`. This is a retro-compatibility
patch for c9d41679fb, so the
menu is marked as active without having to rename it, by
removing this `website.` thing.

2. If you defined two menus with as url `/page/test` and `/page/test2`
Both menus were flagged as `active` when you browsed the url
`/page/test2`, because it started by both menus urls.

Fixes #3059
Closes #3070
2015-08-14 17:11:16 +02:00
Mathias Neef c9d41679fb [FIX] website*: `active` class in menu
In the top menu bar, the `active` class is set when the
menu url matches the page url (the url in the browser url bar)

A while ago, we made so all urls
`/page/website.***'
were automatically redirected to
`/page/****`

Therefore, if the menu url still contains this `website.` prefix,
the active class wasn't set on it, while it should.

Fixes #3059
Closes #3070
2015-08-14 17:10:46 +02:00
Christophe Simonis 0f2c7fa4ab [MERGE] forward port of branch saas-3 up to e95e9f8 2015-08-14 16:02:57 +02:00
Christophe Simonis e95e9f8878 [MERGE] forward port of branch 7.0 up to 11cd8ba 2015-08-14 16:02:31 +02:00
Christophe Simonis 856cb6fcb0 [FIX] models: distribute ORDER BY direction 2015-08-14 15:42:37 +02:00
Christophe Simonis dac52e344c [FIX] models: "ORDER BY" on many2one fields
When ordering results on a many2one fields, results are ordered by
order of the target model. The code was wrongly assuming that this
`_order` attribute only contains `_classic_read` fields (that can be
directly read from the table in database). Now correctly generate the
"ORDER BY" clause using the current table alias.

`res.users` can now be sorted by name.
2015-08-14 15:42:37 +02:00
Christophe Combelles 11cd8ba06c [FIX] web_kanban: access gravatar with current scheme
When Odoo is accessed in https, inserting the gravatar
image using the http protocol leads to a security
alert in most browsers.

Closes #3042
2015-08-14 15:35:48 +02:00
Joren Van Onder d8c5299dc0 [FIX] point_of_sale: posbox_create_image fixes
- don't add comments in posbox ld.so.preload, it causes the second line to be
  interpreted as a library.
- allow image creation in headless environment. This checks whether or not X is
  running and runs qemu-system-arm with or without graphics.
2015-08-14 11:08:51 +02:00
Denis Ledoux d98ac716c1 [FIX] account: account type of account created on bank account creation
When creating a new bank account
e.g. Accounting > Configuration > Accounts >
Setup your Bank Accounts

When the user leaves the journal blank,
a journal, and an account associated to this
journal, are automatically created.

The account type of the account created could be wrong,
as it used the account type of the parent of the first
account of internal type `Liquidity`, which
could not be an account of account type Cash or Bank, but of
account type 'View', and such an account type does not
have the right delivery forward method, in order to report
correctly the amounts when closing a fiscal year.

Instead of using the account type of the parent,
it should actually uses the account type of the sibbling,
which have a correct delivery forward method

opw-647311
2015-08-14 10:46:05 +02:00
Denis Ledoux bae0a775e1 [FIX] hr_evaluation: remove group by survey
`survey_id` is a related field, non-stored.
This isn't possible to apply a group-by on a non stored field.

opw-647303
2015-08-13 15:26:39 +02:00
Christophe Simonis 09ceb9cb8a [MERGE] forward port of branch saas-3 up to 4b1496f 2015-08-13 15:18:26 +02:00
Nicolas Lempereur cdb9000449 [FIX] website, base: escaping and unescaping html
When saving a template in version 8.0, html would be saved as it should
be displayed once on the site. In particular, if some text should be
escaped once send to the browser, it will be saved as such.

But when rendering, a text node content is unescaped two times:

* for translation which seems wrong since we already use .text of a node
  which already escaped it, doing it one more time is bad,

* when rendering the template, since the html template is stored in xml,

This commit remove superfluous unescaping for translation, and add an
escaping when saving the changed template content.

closes #7967
opw-646889
2015-08-13 15:15:24 +02:00
Christophe Simonis 4b1496fdd3 [MERGE] forward port of branch 7.0 up to 937b957 2015-08-13 15:14:16 +02:00
Nicolas Martinelli 8827789ff2 [FIX] stock_account: remove traceback introduced by f2108e9
invoice_vals['name'] may not be defined yet.
2015-08-13 12:46:22 +02:00