Commit Graph

94123 Commits

Author SHA1 Message Date
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
Christophe Simonis ed6d9afecc [FIX] purchase: env['product.pricelist'].price_get expect a partner ID 2015-08-13 12:12:15 +02:00
Thomas Rehn 937b9575c0 [FIX] account: check for profit/loss accounts
in method `button_confirm_cash` of `account.cash.statement`

The check was verifying that the profit/loss account
was set on the journal, and if it was, it raised that it
wasn't, which is obviously wrong.

This was solved in Odoo 8.0 by replacing the code
by something more readable in 9dc9169, and the same
logic to check that the profit/loss accounts are
set is still there.

Closes #2924
2015-08-13 12:04:28 +02:00
Tony 4c610a31b9 [FIX] survey: allow change of previous answers for all questions types
Permission error on survey update
The user who answer the survey may not have delete permission for the user_input_line

In a survey, for a survey user (!= manager),
When browsing previous pages of anwsers,
the user wasn't allowed to change his answers
regarding simple choice, multiple choices and matrix
questions, as this kind of answers changes leaded to an
unlink operation, not allowed for survey users.

Closes #2901
2015-08-13 11:19:24 +02:00
Goffin Simon 9fed748647 [FIX] website_sale: error in message
Error introduced by 4f91dc371c
2015-08-13 09:03:30 +02:00
Denis Ledoux 85b2e607bf [FIX] crm: prevent use a sales tag from another team.
On the `categ_ids` fields definition on `crm.lead`,
a domain has been added in order to prevent
the use of a sales tag belonging to another
sales team.

As the domain was overidden in the form views,
with a different domain, it was allowed
to use a sales tag from another sales team.

Besides, the domain applied in the form views,
`[('object_id.model','=','crm.lead')]`
is included in the domain applied in the fiel
definition.

Closes #2898
2015-08-12 17:36:14 +02:00
Goffin Simon 0e446eb5a6 [FIX] sale_stock: 'uom' in context
Force the 'uom in the context to False on the field 'product_id' in the popup
form view "sale.order.form.sale.stock", to force the non-propagation of the
context. To avoid using the uos in function "_product_lst_price" when computing
the public price of a product.

opw:646880
2015-08-12 16:59:35 +02:00
Denis Ledoux 31ffd010b1 [FIX] website_sale: flag partners as customers
When placing an order in the ecommerce, it's
seems obvious that the partner is a customer.

Nevertheless, It wasn't flagged as such in
its partner from, preventing
to see him in the customers list

Fixes #2422
Closes #2881
2015-08-12 16:39:46 +02:00
Goffin Simon 528c15cc7b [FIX] account_analytic_plans: creating an analytic distribution
When creating an analytic distribution, the field "plan_id" must be required.

opw:646788
2015-08-12 13:32:28 +02:00
Nicolas Martinelli 8f96a13855 [FIX] mrp_repair: typo correction
"Fals" instead of "False"
2015-08-12 11:19:42 +02:00
Alexandre Fayolle 74b7b97209 [FIX] stock: let resupply from warehouse work
If you set WH B to be resupplied from WH A, then the scheduler will
generate a procurement with warehouse_id = B and location_id = B.stock.
Running the procurement will find the resupply rule, and this will
create another procurement with warehouse_id = A and location_id =
transit location.

However, without this patch, the resupply route is not part of the
route_ids of warehouse A, and so the 2nd procurement goes in exception
because if cannot find a rule (the search will force a rule linked to a
route which is part of A.route_ids).

Closes #7956
2015-08-12 08:14:48 +02:00
cysnake4713 3cc7f9fc86 [FIX] l10n_cn: multiple fixes in charts of account
* Change account type  'Other Receivable(其他应收款)' close_method to
  unreconciled
* Add new account type 'Other Payable(其他应付款)' to  account template
  '2241 Other Accounts Payable'(其他应付款) .
* Change Account template '1221 Other Account Receivable(其他应收款)''s
  type to receivable.
* Rename Account template '1001 Cash (现金)' to '1001 Cash (库存现金)'
  to fit new accounting standard.
* Fix double account template id 'small_business_chart1602' problem.
* Several misused account template
* add view account to small business account template

Closes #7535
2015-08-12 08:09:44 +02:00