Commit Graph
53 Commits
Author SHA1 Message Date
AaronHForgeFlow 65094a3af7 [FIX] purchase: typo in security rule name
Closes #57616

closes odoo/odoo#57860

X-original-commit: 4c78b85aa65ffef0e1d8385b626c91c468593ea6
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
2020-09-16 14:04:31 +00:00
yhu-odoo 181c7d82e3 [IMP] purchase: send reminder mail to vendor
1. automatically send a reminder mail to vendor to confirm the receipt
date. If confirmed, (confirmed by vendor) will be added next to the
receipt date. If not, vendor can update the date on the portal website.
An warning activity will be set for the purchase representative for this
update.

2. Vendor can also comfirm recieption of the PO when we 'send PO by mail'.
If confirm, (confirmed by vendor) will be added next to the confirmation
date. An filter is added in the PO search view to show all unconfirmed
PO.

Task 2230811
PR #49921

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-05-27 08:20:17 +00:00
William Henrotin 235827d890 [FIX] purchase: purchase user should be able to create vendors bills
Before this patch, the purchase users get an access violation error
at the invoice creation from a purchase order. This was due to
some missing ACL between v12 and v13.

Task : 2206969

X-original-commit: 4c4fb33e4bbc78a85ad309baf5df906cf16566ea
2020-03-26 10:26:17 +00:00
Victor Feyens a3ded9043d [IMP] *: declare ir.rule in noupdate
ir.rule are default values but can be customized based on the
company's policy and needs.
This is typically a record that is in noupdate as should be
customization-friendly.
2020-03-20 16:21:25 +01:00
Victor Feyens 532c083cbb [IMP] *: remove global field definition in ir rules xml
It is a computed field, there is no need to manually set its value.
2020-03-20 16:15:40 +01:00
Yannick Tivisse 4c291e3f70 [IMP] base: Display searchpanel on ir.module.module views
Purpose
=======

The current kanban view is messy. It is difficult to identify which
apps are installed or not. The user can completely miss a module
that might have interested him. A search panel would make things way
more readable.

closes odoo/odoo#44401

Taskid: 2181557
Related: odoo/enterprise#8144
Related: odoo/upgrade#879
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-03-05 14:03:45 +00:00
Parth Choksi ebaa132d5d [IMP] various: Clean settings UX (back2basics)
TaskID: 2028958

closes odoo/odoo#35551

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-08-21 12:12:33 +00:00
Yannick Tivisse a5b6f31cf2 [IMP] base: Contextualize the multi company
Purpose
=======

Allow the user to select the allowed companies for which he wants to see records
on top of selecting his current company.

It is confusing for users to see the records from the company he is connected to
and the records of the children companies.

Instead of using the hierarchy of companies to access records across companies,
the user can now select (from his set of allowed companies) the companies for
which he wants to access records.

/!\ This means that the user will interact with records from company A when in
company B.
Example: a SO has been created and confirmed in A. When in B, I create the
invoice from it.

Specifications
==============

1/ Deprecate the parent/children hierarchy on the res.company model. The fields are
kept on the res.company model to ensure the retro-compatibility, but won't be used
accross the standard code anymore. The only functional usage for this mechanism
was to allow to see records from several companies by creating a virtual parent
company, which will be possible with the new mechanism.

2/ By default, a user will only see the records of the company he is connected
to (or records without a company). (It is still editable by the user if needed).
For that, put this information in the user context, to allow having different
configurations on different browser tabs. Instead of having domains like
['|',
('company_id', '=', False),
('company_id', 'child_of', user.company_id.id)]
you'll have something like
['|',
('company_id', '=', False),
('company_id', 'in', company_ids)]
Note that the 'company_ids' is a value that is passed in the evaluation
context on the record rule, as we already have user, or time.
company_ids is a list of the ids of all the enabled companies in the
user's context.

3/ Out of the generic improvements brought by this task, this will illustrate
issues that could exist since several versions. For example, it should not be
possible to create a scrap order for the company A with a package of the company
B, or it should not be possible to create an invoice on the company A with
payment terms from the company B. Before the version 12.0, it was easy to
encounter this kind of issues as the admin was the SUPERUSER_ID. A positive side
effect of the fact that the SUPERUSER_ID has become an inactive user was to
make it more difficult to introduce mismatch on the records, but haven't solved
the issue, as it was still possible to do it with parent companies
configuration. Some of these issues have been fixed in this commit, but all the
business flows should be re-tested to check if an ir.rule should be introduced
(eg: a multi company rule for stock.quand.package), if the company of a record
is correctly transfered to another record created from the first record (eg:
From a SO, create an invoice and a payment, the company of the sales order
should be transfered on the invoice and the payment, even if the company of the
sales order is A and I'm logged into the company B with the company A enabled.

4/ Currently, if I click on a button on a notification email (example 'View
Task'), I face a traceback if I'm not logged into the company of the record.
Now, if you click on a button and if you have access to the record, the correct
company will be automatically set.

5/ If I display a kanban view with several records from several companies (and
an image), all the images should be displayed.

6/ Currently if you copy paste an url, this will crash if you're not in the
correct company. This won't be fixed because it's quite impossible to do it in
a clean way. This task brings a workaround. Copy/Paste -> Traceback -> Log into
the correct company, re-copy/paste -> Ok.

7/ 2 property methods have been added on the environment to retrieve the company
on which the user is logged in and the companies the user enabled, on a specific
tab.
That way, when creating a record, instead of doing
default=lambda self: self.env.user.company_id
do
default=lambda self: self.env.company_id
On the other hand, to retrieve the enabled companies, do
companies = self.env.company_ids

8/ Modify the Company Switcher widget to allow to log into another company
WITHOUT writing on the res.users (and thus bringing cache invalidation issues
and so on). Also allow to enable several companies and see records from several
companies, and independantly of the other browser's tabs.

9/ When focusing on a tab, save the current company configuration on the local
storage. That way, when doing 'CTRL+T' or a middle click, the context is
propagated to the new tab.

10/ Improve the error message in case of multi company access errors. Now, when
the user is in debug mode, display the related names of the records and the name
of the user who brings the issue.

11/ Remove the context erasing when writing on a res.users
This is probably coming from the migration to new API of the base module.
The context was not propagated at this moment, which was a common mistake at
that time. When migrating the module, probably by using the 'black box' method,
as the context was not propagated, it was erased on the new version. This is
now an issue because the context (i.e. the enabled companies) was erased when
writing on a res.users, leading to tracebacks.
See: https://github.com/odoo/odoo/commit/7eab8e26d3d46c53f4be924d6a34e80a66e74960#diff-4c2e738ee8f64f11806c889ea097b5e7R624

12/ Fix the crash manager on redirect warnings. The issue is the following
- Create an invoice on a company without a configured CoA.
- Set a partner
- On the onchange_partner_id, a redirect warning is raised to propose you
to configure a CoA
- Click on 'Go to the configuration panel'
- A generic warning says something like 'Do you want to discard your changes?'
- Click on yes, the page refreshes, but not on the redirect action.
Now, set correctly the action on the hash, and reload instead. The breadcrumb is
lost for example, but you reach the correct action at least.

13/ Introduce a res.group to enable/disable the multi company per tab
feature.

14/ To help the users to know which tab is in which company, add the
possibility to have a favicon per company. When creating a company,
the classical 'O' icon is colored by default in a random color.

15/ Remove the company switcher on the frontend. This was mainly there
to allow a user to swicth to the company linked to the website.
This behavior is now transparent to the user. If the website A is
activated, then the company set on the context is the company of the
website.

16/ Deprecated the _company_default_get method on the res.company
model. Remove the method _get_company on the res.users model.

17/ Add 'allowed_company_ids' and 'current_company_id' on the pyeval
context. You can now use those variables on domains in the views to
access directly to the activated company.ies on the current tab.

TaskID: 1960971

closes odoo/odoo#32341

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-05-13 08:57:49 +00:00
jbm-odoo ec07e72845 [IMP] base,*: Reorganize access rights groups
Purpose
=======

Access group terminology is missleading. Yous have to be manager to administrate
an application. This task consists to rename groups to be understandable for everyone.

Groups should be reorganised on the users form to be more explicit.

Specification
=============

1/ Rename 'Manager' to 'Administrator' in users groups.
2/ Define a hierarchy on access groups by using the category_id in the manifests
   A category 'Operations/Project' will create a category Project with a parent
   category 'Operations', and something smart is already developed (in modules/db.py)
   to avoid duplicating categories.
3/ Add a group in expenses to be able to approve expenses reports for my team.
4/ Add a group in timesheets to be able to approve timesheets for my team.
5/ Remove partially the useless crap in ir_module_category_data.xml
6/ Sort access rights groups on users form according to its parent category

closes odoo/odoo#29362

Signed-off-by: "Yannick Tivisse (yti)" <yti@odoo.com>
2019-03-05 09:08:12 +00:00
Christophe Simonis 86ff929ad6 [MERGE] forward port branch saas-11.4 up to 1199451606 2018-09-10 17:06:18 +02:00
Yannick Tivisse 4587816198 Revert "[IMP] base: Remove unused module categories"
This reverts commit 382fbd3520.
2018-09-10 14:23:43 +02:00
Raphael Collet 2f7c03d9ca [IMP] base: add regular user admin as uid 2
User 1 simply becomes a technical user (inactive, no password).
2018-08-23 21:38:57 +02:00
jem-odoo 3c1e886ced [IMP] purchase: add access rule for report
When splitting purchase and stock, the access
rules of the report was wrongly moved to
purchase_stock. This commit restores balance
in the universe.
2018-06-07 15:47:16 +02:00
jem-odoo e38ed7c780 [MOV] purchase_stock: move code from purchase
We want to break the dependency between stock and purchase
for our furtur developpement. For more modularity, a new
bridge module 'purchase_stock' is created.
This commti move part of business code, views, data, ...
related to stock management from purchase into purchase_stock
without changing any feature.

Task #47927
2018-05-23 10:13:49 +02:00
Yannick Tivisse 382fbd3520 [IMP] base: Remove unused module categories
The categories other extra rigths and hidden are not used now.
2018-04-26 15:13:38 +02:00
Fabien Pinckaersand 051dfea35e [IMP] account: new way of auto-completion of vendor bills/credit notes
This adds the possibilty to select another account.invoice object in a vendor bill or credit note, to automatically copy its lines.

When the purchase app is installed, the same field can be used for auto-completion and users can choose between vendor bills or purchase orders (preferably PO)

Co-authored-by: dat@openerp.com
2018-04-25 17:12:15 +02:00
Joren Van Onder 079a13a349 [IMP] analytic: in-depth refactoring
* analytic accounts can be shared among companies
* amount on analytic lines always refer to amount in company currency of which it belongs to
* add analytic groups (hierarchical way to classify analytic accounts)
* analytic tags:
- only present on analytic lines, not anymore on analytic accounts
- can be used to distribue/split an analytic lines among several analytic accounts
- enabled by a dedicated res.group
- added on several objects (vouchers, expenses, analytic defaults...) as well as in bank statement reconciliation widget (manual counterpart and account.reconcile.model)

* bunch of fixes made related to analytic

Was PR #22124. Was task 32386. Original work by tbe.
2018-01-31 15:53:04 +01:00
Christophe Simonis 2f95cfb8ed [MERGE] forward port branch saas-16 up to f99c4f2b48 2018-01-19 12:43:58 +01:00
Christophe Simonis 42264d8dcb [MERGE] forward port branch saas-16 up to 5d7ad2b16c 2017-11-30 18:43:08 +01:00
eLBati d8e49d3886 [FIX] purchase: add missing multi company record rule
Apply an inter-company rule for the purchase.report

opw:779192
2017-11-15 14:54:28 +01:00
Thibault Delavallée bcada50bc5 [MOV] (website_portal_)purchase: move customer portal to purchase 2017-08-21 13:54:08 +02:00
Yannick Tivisse ff63f5d0a3 [IMP] base_setup: Allow the admin to modify the default user acess rights
Add a link in the general settings to access easily the default_user form view in order to modify the default access rights

The default_user manager rights declarations in all the applications have been move in a noupdate="1" definition to avoid the manual configuration overwrittings
2016-08-23 11:14:37 +02:00
Denis Vermylen (dve) ba3d3582bc [MIG] purchase: Migrate to new API 2016-08-05 14:04:37 +02:00
Yannick Tivisse 8ff9cbad2c [IMP] sale,purchase,stock,account: Don't display an empty 'warning' page
And add a category hidden on the res.group definition
2016-05-06 17:06:35 +02:00
Fabien Pinckaers ff110b0ed8 [IMP] purchase_requisition: blanket orders and usability cleaning
Improved usability & code cleaning:
  - Support for blanket orders, in addition of purchase tenders
    ("Purchase Agreements")
  - Create a RfQ in one click, no wizard anymore
  - Control of quantities really purchased
  - Better control of side-effects thanks to purchase requisition types
  - JS code removed (not necessary)
  - Workflow removed

Closes #11666
2016-04-29 10:43:49 +02:00
Yannick Tivisse 536dbc50db [IMP] account,sale,purchase,stock: Add groups to activate warnings 2016-04-07 10:08:20 +02:00
Yannick Tivisse 1ecba213f4 [IMP] Newly created users get all manager access right
Coming from a bug in web_settings_dashboard. Invited user didn't have any rights
when created from the dashboard, which was leading to an error.

This bug leaded to a new discussion. Better to have basic employee having user
rights for all main applications. For bigger entreprises there is an admin that
will carefully remove extra rights, if necessary. The target is small businesses,
it makes sense that every way to create a user gives the same result.

In conclusion, each new user has a full access to the applications by default

How is it implemented ?
We added an inactive default user which original access right to the groups
'base.group_user' and 'base.group_partner_manager' in base. Each
application will extend the default user's access right by adding the maximal
access right for this application.

On user creation, we will use by default the 'group_id' field from the default
user. We will in the same time remove the ugly 'default_groups_ref' key which
was passed sometimes in the context for some fields in some views, and sometimes
nothing.

So, the user can modify the access rights for the default user, but he should be
aware that removing project user access rights for a default user will prevent
a *created on the fly in a task* user will not be able to access the task.
2015-11-20 16:27:32 +01:00
Yannick Tivisse e176b4a22e [IMP] Purchase: Add a group in res_config to display 'Vendors Pricelists' menuitem 2015-09-16 10:07:55 +02:00
Cedric Snauwaert 5593671ee4 [FIX]purchase_requisition: method to generate po from bid line and add a group as well as option in res_config for advance mode
bzr revid: csn@openerp.com-20130529154305-zhok6su2fmlet3x9
2013-05-29 17:43:05 +02:00
Olivier Dony 3fe6987ce7 [MERGE] Harmonization of noupdate flag on security XML data, courtesy of Alexis de Lattre (Akretion)
ir.rule records are in noupdate data blocks to let the admin
alter them without fear of them being reset at next update.
Other records such as groups are in normal mode, so they
can be updated whenever necessary

bzr revid: odo@openerp.com-20121218232001-t425t4hi7qbmsip2
2012-12-19 00:20:01 +01:00
Ajay Chauhan (OpenERP) 698f50daca [IMP] removed group 'group_delivery_invoice_address' from purchase
bzr revid: cha@tinyerp.com-20121122125417-yo3ma88is5euw038
2012-11-22 18:24:17 +05:30
Fabien Pinckaers 31a4392e36 [MERGE] purchase + [FIX] misc sale order without delivery orders
bzr revid: fp@openerp.com-20120916150517-16vr5lp419b0kpid
2012-09-16 17:05:17 +02:00
Alexis de Lattre 5101771cd9 Harmonize the noupdate flag on security XML files :
- ir.rule objects are noupdate="1"
- all other objects are noupdate="0"

bzr revid: alexis@via.ecp.fr-20120713170838-pjsysliyt6twazrc
2012-07-13 19:08:38 +02:00
Mayur Maheshwari (OpenERP) 5b134f13b5 [IMP]purchase: added a groups on filed and set topbar of state and improve a menutip
bzr revid: mma@tinyerp.com-20120517054451-o3g0c8b62ug4k19m
2012-05-17 11:14:51 +05:30
Raphael Collet ba1454149c [IMP] groups: remove auto-inclusion of admin in groups, and make the inclusion explicit in groups
bzr revid: rco@openerp.com-20120404090830-nteimn2kvz8nkk7h
2012-04-04 11:08:30 +02:00
Raphael Collet 135e671fa1 [IMP] sale, purchase: make specific analytic accounting groups imply general analytic accounting group
bzr revid: rco@openerp.com-20120402094204-09h0upptc7qric7a
2012-04-02 11:42:04 +02:00
Raphael Collet 082abfaa44 [IMP] sale, purchase: remove option 'taxes' from config wizards
bzr revid: rco@openerp.com-20120330120730-dilz5owc82s3yrl0
2012-03-30 14:07:30 +02:00
Raphael Collet 04f33ca7ac [IMP] account.config.settings: move sale and purchase group fields in their respecive module
bzr revid: rco@openerp.com-20120329142121-lc5b6d3mcds68p34
2012-03-29 16:21:21 +02:00
Raphael Collet fe31238077 [IMP] purchase: change xml id of groups
bzr revid: rco@openerp.com-20120322110834-k49v2g4w1wd9jqk2
2012-03-22 12:08:34 +01:00
Turkesh Patel (Open ERP) ebd9c6e398 [ADD] added tax policy field
bzr revid: tpa@tinyerp.com-20120307115453-he70yxpcpxsr1yfx
2012-03-07 17:24:53 +05:30
Raphael Collet 5aa61b26e8 [IMP] product, project, purchase, purchase_requisition: add group categories
bzr revid: rco@openerp.com-20111212140528-g8oxverkipswionf
2011-12-12 15:05:28 +01:00
Raphael Collet ba6342174e add group implications
bzr revid: rco@openerp.com-20110802130811-pkdmw43ufifz0tpj
2011-08-02 15:08:11 +02:00
Olivier Dony beac68b7d2 [REVERT] all: revert incorrect change of default ir.rules for multi-company
By default only records belonging to the user's company or descendant companies
should be visible. The original patch introduced visibility of records
from ancestor companies, which should be suited only for a few cases, such
as res.patner.
Original revision: 3164.24.175  sbh@tinyerp.com-20101223095216-n6psmzicdcs8is8x

lp bug: https://launchpad.net/bugs/720175 fixed

bzr revid: odo@openerp.com-20110228135754-6skiy4fb9dg54xb6
2011-02-28 14:57:54 +01:00
Sbh (OpenERP) abd780fd52 [Fix] : correct security rule of company_id
bzr revid: sbh@tinyerp.com-20101223095216-n6psmzicdcs8is8x
2010-12-23 15:22:16 +05:30
rpa (Open ERP) 6caca89f87 [IMP]: Moved reference of demo user from *_security.xml to demo file
bzr revid: rpa@tinyerp.com-20101119102525-8gyj1gmm1w29rwxu
2010-11-19 15:55:25 +05:30
aag (OpenERP) eeaa68471d [IMP] IN ALL: the demo user should be in all applications name user groups, Task id: 1771
bzr revid: aag@tinyerp.co.in-20101111131855-v07piwfyp33wlmng
2010-11-11 18:48:55 +05:30
Fabien Pinckaers 2c71227203 improvements_view
bzr revid: fp@tinyerp.com-20100629120926-9c7qdw0mug279ehh
2010-06-29 14:09:26 +02:00
Rvo (Open ERP) d4cb287b1d [IMP]:changes in ir.rule demo to support the new functionaliy of ir.rule
bzr revid: rvo@tinyerp.co.in-20100428125109-wq33afl8104gx6rf
2010-04-28 18:21:09 +05:30
Mantavya Gajjar 178ecac310 [REVIEW]: review record rules for the sale, purchase, account, stock, and produc
bzr revid: mga@mga-20100316143337-ng6bmx315jq3ymu4
2010-03-16 20:03:37 +05:30
Fabien Pinckaers 7ea99724a7 [imp] multi-company + merge
bzr revid: fp@tinyerp.com-20091128092522-g7fumj3p55kv6ygr
2009-11-28 10:25:22 +01:00