Commit Graph
55 Commits
Author SHA1 Message Date
Yannick Tivisse d7ddd5de53 [IMP] lunch: Store the lunch location on lunch orders 2021-07-16 12:02:56 +02:00
Yannick Tivisse 7778031977 [IMP] lunch: Remove lunch.product.report model
The cross join with res.users caused dramatic performances issues.

TaskID: 2586326
2021-07-16 12:02:56 +02:00
Barad Mahendra 231eaa0fd8 [IMP] lunch: Improve the views and multi-company behaviour
Purpose
=======

Improve the lunch categories and mutli-company environment.

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

- Able to archive a product category and this should archive/unarchive
all the products in that category also added the filter for same.
when unrchive the product if category is archived then raise the
Validation to change the category OR unarchive the category.
- add a default image for lunch categories
- Adapt the size of the default image, currently it's too big,
- On lunch order form view if product images is not set then display
the category image same as kanban image.

- Add a company field on the Product categories (it's already there
but it should be visible on the view form). Added the multi company
rule for the product category and if company is not set on category
then it will be sharable by all the company. so default company on
product category null.
also on lunch product and report check the multi company and display
the product accroding to company.

closes odoo/odoo#45797

Taskid: 2200002
Closes: #45797
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2020-06-16 13:18:06 +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
Lucas Lefèvre 983edd2fcc [FIX] lunch: Apply real multi company ir.rule
The current "mutli-company filter" of lunch product reports is hardcoded
in the SQL view, based on the user's company, ignoring the general
mechanism of multi company rules (env allowed companies).

Task 2202678

closes odoo/odoo#46630

X-original-commit: b77d2bde9431ae549779a466a76dae7c3173d8a6
Signed-off-by: lul-odoo <LucasLefevre@users.noreply.github.com>
2020-03-02 08:57:10 +00:00
RomainLibert 9ef2157d17 [IMP] lunch: location multi company
closes odoo/odoo#36331

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-09-04 07:26:43 +00:00
Christophe Simonis 140ee6b8f0 [MERGE] forward port branch saas-12.4 up to 98a55917a6 2019-08-14 16:48:10 +02:00
Christophe Simonis 7d04dc1c7c [MERGE] forward port branch saas-12.2 up to 9e74730a26 2019-08-06 18:48:24 +02:00
RomainLibert 3be79c6989 [FIX] lunch: add rule on lunch order
User should not change the order once it is ordered

closes odoo/odoo#35212

Signed-off-by: Romain Libert (rli) <rli@odoo.com>
2019-07-26 11:20:09 +00:00
Lucas Lefèvre 50043cc3ad [IMP] lunch: Add multi-company ir.rule
- Add a related on the lunch.supplier to the company id of the linked res.partner
- Add related on the product: to the company id of the linked lunch.supplier
- add multi company Record rules

closes odoo/odoo#34859

Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-07-17 13:17:59 +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
RomainLibert 855c6dac25 [IMP] lunch: automatize lunch orders
We would like to automatize lunch as currently all orders are manually ordered and validated,
and a cash move has to be manually created each time you want to credit the wallet of some user.

1/ In this commit we add a new widget that comes with the kanban view
   and will allow to take orders in a friendly manner.
2/ We also add a lunch.supplier model this also allows you to configure an
   automatic ordering via email.
3/ Introduces new lunch.location model to replace res.partner on suppliers
4/ New mail template for automatic ordering
5/ Add the concept of new products (mark a product as new until some date)
6/ The toppings are now defined by product category
7/ Lunch.order removed, lunch.order.line renamed into lunch.order
8/ New SQL report to get the wallet content (aggregate of lunch.cashmove and lunch.order)
9/ New setting to allow negative wallet (aka overdraft)
10/ Application now remembers what notes and toppings you last ordered with your product
11/ You can change your location using the widget on the kanban view
12/ Edition of the order can be done until the order is arrived

TaskID: 1856876
TaskID: 1916105

closes odoo/odoo#30028
2019-01-18 15:33:04 +00:00
Yannick Tivisse d1c3948a05 Revert "[IMP] lunch: automatize lunch orders"
This reverts commit f727b8f0b5.
2019-01-08 13:12:33 +01:00
Yannick Tivisse 3729ebf34d Revert "[IMP] lunch: reintroduce lunch_alerts, change display of wizard"
This reverts commit 6f5dc5733f.
2019-01-08 13:10:55 +01:00
RomainLibert 6f5dc5733f [IMP] lunch: reintroduce lunch_alerts, change display of wizard
We want to be able to use alerts in order to display a message to the
users.
We want to have a minimal display in the wizard.
We want to link the toppings to the categories instead of the suppliers.

closes odoo/odoo#29301
2018-12-06 09:33:30 +00:00
RomainLibert f727b8f0b5 [IMP] lunch: automatize lunch orders
We would like to automatize lunch as currently all orders are manually ordered and validated,
and a cash move has to be manually created each time you want to credit the wallet of some user.

In this commit we add a new widget that comes with the kanban view and will allow to take orders
in a friendly manner.

We also add a lunch.supplier model and an integration with the hr module in order to filter what
products you can order depending on your working location, this also allows you to configure an
automatic ordering via email.

TaskID: 1856876
2018-12-04 11:56:21 +01: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
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
Parth Mehta 54245deebd [IMP] lunch: view improvement of previous orders.
Purpose:
1/ In the lunch app, previous orders list: the products are not displayed.
It is written X Records but you don't see the products name. Therefore
the information is useless.

2/ It is dangerous to be able to delete a previous order that has been
received (it changes the lunch account amount)

What is done:
In Previous Orders list :
- The view should be based on the sales orders lines. In that case, each
  line = 1 product.
- add a note column (between product and status)
- add a user column (between status and total)
- Rename Total into Price
- If order.line status = ordered or received, it shouldn't be possible
  to delete it. An ir.rule has been added to achieve this.
- An additional group access right check is made in the actions 'confirm'
  'cancel' and 'order' because they can be called in batch under the
  Action button.
2016-03-10 10:18:17 +01: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
Nicolas Martinelli 3d63c15a56 [MIGR] lunch: migration to the new API, cleaning and new
widget for displaying previous orders.

Detailed changes :
- previous order is not a computed field, with its own custom widget that has been designed
according the new spec for widgets;
- useless wizards have been removed, and replaced by some server actions that perform the
same action with less code and views;
- removed deprecated or incomplete reporting;
- some renaming to follow the new specifications of module coding
2015-04-23 10:27:08 +02:00
Martin Trigaux a77002035d [FIX] lunch: allow other people to create lunch orders for others
bzr revid: mat@openerp.com-20140428075301-ah6lgb7zzkr6vb3o
2014-04-28 09:53:01 +02:00
Martin Trigaux 3f869b47ce [FIX] lunch: fix security rule, user_id being a related field he may not be set yet at the creation
bzr revid: mat@openerp.com-20140425074018-wnrhgsavhmp91xjv
2014-04-25 09:40:18 +02:00
Martin Trigaux 1b75fc6d95 [IMP] lunch: add security rules, it's very impolite to look in other people plates
bzr revid: mat@openerp.com-20140409131016-kzx7scln4daz14xj
2014-04-09 15:10:16 +02:00
Cedric Snauwaert 26f0b6bfac [FIX]lunch: in order to see lunch menu, put root user as lunch manager by default even if no demo data
bzr revid: csn@openerp.com-20130307084226-o02po2v301x5vgbe
2013-03-07 09:42:26 +01:00
Arnaud Pineux 70b9f41051 [FIX] Lunch wrong access rights
bzr revid: api@openerp.com-20121204083635-trp1qh1kidabngsr
2012-12-04 09:36:35 +01:00
Arnaud Pineux a3a26dc755 [IMP] demo data & groups -> refactor
bzr revid: api@openerp.com-20121119142146-33aix5tk6bldizu9
2012-11-19 15:21:46 +01:00
Arnaud Pineux 848679322a [IMP] demo data & groups -> refactor
bzr revid: api@openerp.com-20121119140801-yxj936dhu1eapicl
2012-11-19 15:08:01 +01:00
Arnaud Pineux 4820730cd6 [IMP] demo data & groups
bzr revid: api@openerp.com-20121119135628-krq8rle10si51vkh
2012-11-19 14:56:28 +01:00
Vo Minh Thu d05a945fc5 [IMP] lunch: removed a few initialization warnings.
bzr revid: vmt@openerp.com-20121115152557-3lroffi0dtar3rs4
2012-11-15 16:25:57 +01:00
Quentin (OpenERP) 385bf30ae3 [REN] lunch: renamed security/groups.xml to meet OpenERP standards and conventions
bzr revid: qdp-launchpad@openerp.com-20121107104348-9xkt13jmscamgy34
2012-11-07 11:43:48 +01:00
Arnaud Pineux 2a13ed6338 [REF]English demo, fix report, clear security
bzr revid: api@openerp.com-20121106162907-ir7ujoxowlrqouyt
2012-11-06 17:29:07 +01:00
Arnaud Pineux c0971be90b [FIX]some changes
bzr revid: api@openerp.com-20121106155523-vhpbuw6lfniqqgeu
2012-11-06 16:55:23 +01:00
Arnaud Pineux ed791d908c Lunch
bzr revid: api@openerp.com-20121102081548-1ujcb6v6ivsx9dr5
2012-11-02 09:15:48 +01:00
Arnaud Pineux ccdec6f158 [MERGE]Lunch_new application
bzr revid: api@openerp.com-20121024133918-qu0xha3fuaisc0va
2012-10-24 15:39:18 +02:00
Arnaud Pineux 5ac75e44aa [MERGE]Lunch_new application
bzr revid: api@openerp.com-20121004073156-asqlj77f8v3q9m58
2012-10-04 09:31:56 +02:00
Arnaud Pineux eeb08e163e [ADD] Lunch module
bzr revid: api@openerp.com-20121002072149-9gcyy64wap5z7b2h
2012-10-02 09:21:49 +02:00
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 0c1021806d [MERGE] trunk-user-groups-rco: add category_id to groups
bzr revid: rco@openerp.com-20111213141949-ohvn0c9iq6tcl7jj
2011-12-13 15:19:49 +01:00
Fabien Pinckaers f27318c8af [IMP] Security Rule: removed duplicates due to inheritancies of groups
bzr revid: fp@tinyerp.com-20111212181113-mhnnbps3ip8ls6pp
2011-12-12 19:11:13 +01:00
Raphael Collet 084c5d9289 [IMP] hr, idea, knowledge, lunch: add group categories
bzr revid: rco@openerp.com-20111212134938-xwfnq4d3ks1awuu9
2011-12-12 14:49:38 +01:00
Raphael Collet ba6342174e add group implications
bzr revid: rco@openerp.com-20110802130811-pkdmw43ufifz0tpj
2011-08-02 15:08:11 +02:00
Harry (OpenERP) 764b9f251e [FIX] correct regression on intalling module without demo data
bzr revid: hmo@tinyerp.com-20101114134821-7djwpr6nmmxu584q
2010-11-14 19:18:21 +05:30
uco (OpenERP) f7f51a9497 [ADD] Task ID-1720: The demo user should be in all '<application's name> user' groups.
bzr revid: uco@tinyerp.com-20101102095327-77v9g35gjosrc5ky
2010-11-02 15:23:27 +05:30
AMP (OpenERP) 0888189083 [MOD/IMP] tools : Survey,Idea,Lunch,Subscription Usability improvement in access rights
bzr revid: amp@tinyerp.com-20101005133252-hz7jww5xuzjrxal1
2010-10-05 19:02:52 +05:30
AMP (OpenERP) 4cebdcf838 [MOD] tools: usability improvement in access rights
bzr revid: amp@tinyerp.com-20100825112922-0bk9klymjgw6ffiv
2010-08-25 16:59:22 +05:30
AMP(Open ERP) 53cfaebe3f [MOD/IMP] survey,account,email_template,idea,lunch,marketing_campaign,sale,stock_planning : Improvements in access rights
bzr revid: vir@tinyerp.com-20100813060634-laq3wb2d660wcrrp
2010-08-13 11:36:34 +05:30
Vir (Open ERP) 4ac33ec1f9 [MOD] Group name changed , Sales / Salesman to Sales / User
bzr revid: vir@tinyerp.com-20100809060226-jx6plkn6mafiplyz
2010-08-09 11:32:26 +05:30
AMP (OpenERP) acd29a2ff2 [MOD] lunch: usability improvement in access rights
bzr revid: amp@tinyerp.com-20100807124815-bl3z17efhbcmc6m6
2010-08-07 18:18:15 +05:30