Commit Graph
62 Commits
Author SHA1 Message Date
William Henrotin 56097c56e1 [FIX] purchase: add read access on tax tag
As a user accessing only the purchase module, create a request for
quotation, add a line with a tax and a cost > 0.
Confirm the RfQ to create the purchase order.

Before this commit, the user get a access error on account.account.tag
This patch add read access on this model for purchase users

opw : 2466688

closes odoo/odoo#67105

X-original-commit: b52e6ae72429add2bfa01496e704fd9f34a56e01
Signed-off-by: William Henrotin <Whenrow@users.noreply.github.com>
2021-03-02 16:59:06 +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
Rémy Voet (ryv) 94b39d3ea3 [REF] stock,purchase,repair,mrp: clean ACL/report
For stock, purchase, repair and mrp modules, do a small clean of ACL:
Remove duplication and useless line.
Also improve the readability of the stock traceability report.

task-2172399

closes odoo/odoo#45055

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-03-06 09:16:16 +00:00
wan d8c5cc1335 [IMP] account: add a readonly group
Task 2092079
Accounting firms that want to give access to their customers avoiding
mistakes and risks will love this profile that can't do anything
wrong... Maybe as well as companies auditors..?

closes odoo/odoo#39860

Related: odoo/enterprise#6576
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>
2020-01-22 11:23:16 +00:00
Laurent Smet bc131c0cfb [MERGE] manual forward port of accounting-pocalypse (beaa30a3d1)
This commit merges the following models
 * account.invoice and account.move
 * account.invoice.line and account.move.line
 * account.voucher and account.move
 * account.voucher.line and account.move.line

It was the opportunity for a big cleanup of the code, so it also restructures the whole account module, its different models/fields, the tests etc. for a better world and a better code readability.

==== Rationale ====
The rationale of this huge change is that we want journal entries / invoices to be easily edited, and changes reflected in the other model. It's a HUGE feature and very strategic for the fiduciary companies. For example, changing the account of a journal entry needs to be automatically reflected on the related invoice.

The same reasoning applies to sale/purchase vouchers.

==== Changes made in features =====
When creating an invoice, you are now creating a journal entry directly.
--> The object account.invoice no longer exists.
In the same fashion when creating an invoice line, you're now adding journal items directly in the journal entry representing the invoice. If this invoice line has some tax, it may create additional journal items as well.
--> The models account.invoice.line & account.invoice.tax no longer exist

Identically, when creating a sale/purchase receipt with its lines, you are now creating a journal entry directly and there's no more usability difference between encoding a receipt or an invoice.
--> The object account.voucher no longer exists.
--> The object account.voucher.line no longer exists.
--> The whole account_voucher module no longer exists.

Positive side-effects coming from these changes are
* draft invoices/bills/sale or purchase receipts now create a draft accounting entry. Validate these objects now simply post its journal entry. That means that draft invoices/bills/sale or purchase receipt can straightforwardly be included in reporting or budgets.
* opening a journal entry in form view will now always open the correct view: if it's a sale/purchase journal entry we will have a customer invoice/vendor bill view or a sale/purchase receipt view, whatever the menu we're coming from.
* code & business logic simplification. It is also condensed in a single place instead of being partially duplicated on invoices, vouchers and journal entries.

There should be no feature loss, except the one allowing to group multiple journal items together based on the same product during the invoice validation.

==== Changes made in models =====
* account.invoice: model removed. Instead, now use account.move with following mapping

field (account.invoice) 		field (account.move)
-----------------------			--------------------
name 					invoice_payment_ref
number 					name
reference 				ref
comment 				narration
user_id 				invoice_user_id
amount_					total_company_signed amount_total_signed
residual 				amount_residual
state 					state + invoice_payment_state 		/!\ selection changed
date_invoice 				invoice_date
date_due 				invoice_date_due
sent 					invoice_sent
origin 					invoice_origin
payment_term_id 			invoice_payment_term_id
partner_bank_id 			invoice_partner_bank_id
incoterm_id 				invoice_incoterm_id
vendor_bill_id 				invoice_vendor_bill_id
source_email 				invoice_source_email
vendor_display_name 			invoice_vendor_display_name
invoice_icon 				invoice_vendor_icon
cash_rounding_id 			invoice_cash_rounding_id
sequence_number_next 			invoice_sequence_number_next
sequence_number_next_prefix 		invoice_sequence_number_next_prefix

'invoices' subset of account.move can be accessed by using the selection field 'type' or one of the many helpers like is_invoice()

* account.move: now has a valid state 'cancel' that has to be excluded from all business logic
* account.move: field 'amount' renamed into 'amount_total'
* account.move: field 'reverse_entry_id' renamed into 'reversed_entry_id'
* account.move.line: now has a field 'display_type' that has to be excluded from all business logic, in order to support invoice layouting
* account.invoice.line: model removed. Instead, now use account.move.line with following mapping

field (account.invoice.line) 		field (account.move.line)
----------------------------		-------------------------
invoice_id 				move_id
uom_id 					product_uom_id
invoice_line_tax_ids 			tax_ids
account_analytic_id 			analytic_account_id

'invoice lines' subset of all account.move.line from a journal entry can be accessed by using the boolean field 'exclude_from_invoice_tab'

* account.invoice.tax: model removed. Instead, now use account.move.line with following mapping

field (account.invoice.tax) 		field (account.move.line)
---------------------------		-------------------------
invoice_id 				move_id
account_analytic_id 			analytic_account_id
amount 					price_unit
base 					tax_base_amount

'tax lines' subset of all account.move.line from a journal entry can be accessed by using the relational field 'tax_line_id'

* account.invoice.confirm: model removed. Instead, now use the 'post()' function of account.move
* account.invoice.refund: model removed. Instead, now use account.move.reversal to reverse the entries with the same options as we had for invoices
* account.voucher: model removed. Instead, now use account.move of type in ['out_receipt', 'in_receipt]
* account.voucher.line: model removed. Instead, now use account.move.line

==== Changes made in functions ====
* on account.move, method _run_post_draft_to_post() renamed into _autopost_draft_entries()
* on account.move, method action_account_invoice_payment() renamed into action_invoice_register_payment()
* on account.move, method action_invoice_reconcile_to_check() renamed into action_open_matching_suspense_moves()
* on account.move, method _get_domain_edition_mode_available() renamed into _get_domain_matching_supsense_moves()
* on account.move, method _get_intrastat_country_id() renamed into _get_invoice_intrastat_country_id()
* on account.move.line, method _get_domain_for_edition_mode() renamed into _get_suspense_moves_domain()
* in account.bank.statement, contextual key 'edition_mode' renamed into 'suspense_moves_mode'

Was task 1917430
2019-07-01 13:45:57 +02:00
Simon Lejeune 0477bdb75a [REF] product, stock_account, etc: remove product.price.history table
This table tracked standard price changes.
It was used to compute the valuation at date in AVCO and standard
through `get_history_price`.

The next commits will introduce the stock valuation layers, separating
the valuation from the stock move. As a valuation layer will be created
when a standard price is updated on the product or when a stock move
impacts the valuation, the information from this table will be
duplicated.

We don't plan to adapt `get_history_price` to work with the valuation
layer since the valuation report at date and today will be the same: a
grouped list on the valuation layers with eventually a domain on the
date.

task-1875873
2019-06-09 14:11:36 +00: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
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
XavierDo 2966d4faed [IMP] product: rename product.uom into uom.uom
Also rename product.uom.categ into uom.category to
 give it a decent name.
2018-02-26 14:27:26 +01:00
XavierDo 6a378e3839 [IMP] product: move uom in a new addon
Moves UoM models, test and data to a new addon in
order to be able to use uom without product.
A simple example is be to be able to use UoM for
timesheets.

This commit only move code, and adapt xml ids
without chaging any feature or functionnal
behavior.
Note: 'product' module now depends on new
'uom' module.
2018-02-26 14:27:26 +01:00
Moises Lopez 85a3e1e385 [REF] *: deal with duplicated xml_ids in views and security rules
Was part of PR #19820. Courtesy of Vauxoo
2017-11-24 15:37:28 +01:00
Thibault Delavallée bcada50bc5 [MOV] (website_portal_)purchase: move customer portal to purchase 2017-08-21 13:54:08 +02:00
Thibault Delavallée ab00000624 [CLN] purchase: reorder some access rights to ease reading
So much badass.
2017-08-21 13:53:55 +02:00
Thibault Delavallée aaea9f3172 [FIX] purchase: remove duplicated and wrong access right
Access on purchase order lines for managers is present twice in the
security file. Once with only read access and once with full access.
I suppose the latter one is the correct one.
2017-08-21 13:52:52 +02:00
qdp-odoo e4dc50bf58 [IMP] pricelists improvements. Was PR #8228 2015-08-31 16:57:32 +02:00
Fabien Pinckaers 3f108c4fdf [IMP] removing complex and unuseful concepts 2015-07-02 21:27:42 -07:00
qdp-odoo c04065abd8 [IMP] accounting v9. Yeeeeaah 2015-05-05 17:28:04 +02:00
qdp-odoo b92c6b3101 [IMP] base, ir_sequence: added use_date_range field on ir.sequence, that allows to have several sequences running for the same one depending on date ranges (similar to what was existing previously on accounting with FY, which is now deprecated) + port to new API 2014-11-21 10:09:29 +01:00
cod-odoo 999300ce5d [IMP] sale,purchase: allow invoicing
(closes #500)

(cherry picked from commit 84c0595aef3a417702c81b5226ae1f61817a2bf8)
2014-09-25 11:18:44 +02:00
Quentin (OpenERP) 7ed26f1e07 [REF] product refactoring: prices.history model renamed into product.price.history + passed 'date' as real parameter instead of contextual one in get_history_price() because it makes more sense.
bzr revid: qdp-launchpad@openerp.com-20140428153355-vbuam1hfnah7m4wp
2014-04-28 17:33:55 +02:00
Cedric Snauwaert 9cb7aab2d0 [FIX]access right for prices.history (should be the same as the one for product)
bzr revid: csn@openerp.com-20140117135034-8m7798nqu1spz370
2014-01-17 14:50:34 +01:00
Cedric Snauwaert 277531f21d [FIX]fix installation of several modules: purchase, sales, purchase_req, mrp, sale_stock
bzr revid: csn@openerp.com-20130709150027-wy8avglaosiktm5m
2013-07-09 17:00:27 +02:00
Stephane Wirtel a598e04752 [MERGE] purchase: a purchase user can create a quotation and confirm it
bzr revid: stw@openerp.com-20120822133729-8her237u00inknsl
2012-08-22 15:37:29 +02:00
Bharat Devnani (OpenERP) a638b09c13 [IMP] allowed purchase user to read the products and create and confirm purchase order
bzr revid: bde@tinyerp.com-20120817071950-3h1c0x2yxun8kd68
2012-08-17 12:49:50 +05:30
Dharti Ratani (OpenERP) b366ef0544 [IMP]Allocating read access of product form to group purchase manager
bzr revid: dhr@tinyerp.com-20120621051616-bk606ej84oauqbzn
2012-06-21 10:46:16 +05:30
Quentin (OpenERP) ffd0c86ec2 [FIX] a lot of fixes in several modules, as the result of the code review of the merge of the objects res.partner and res.partner.address
bzr revid: qdp-launchpad@openerp.com-20120330090837-s87z2qzsvynhlbwr
2012-03-30 11:08:37 +02:00
Bharat Devnani (OpenERP) 3662f7e5db [REM] removed res.partner.address reference from purchase module, just need to solve 'test/process/edi_purchase_order.yml' yml and its references
bzr revid: bde@tinyerp.com-20120305132539-1u8zok2ccy6csemu
2012-03-05 18:55:39 +05:30
Mayur Maheshwari (OpenERP) 26e17799a4 [FIX]stock: set a read rights to the user in stock.move
lp bug: https://launchpad.net/bugs/917333 fixed

bzr revid: mma@tinyerp.com-20120118084854-rpq7u420uxdvcepy
2012-01-18 14:18:54 +05:30
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
RavishchanraMurari (Open ERP) 13862eb7a1 acess_right_of_partner_manager
bzr revid: rmu@tinyerp.com-20110711050722-mdw6i1qsyhn6vw45
2011-07-11 10:37:22 +05:30
Fabien Pinckaers 910b8c4af8 [IMP] access rights
bzr revid: fp@tinyerp.com-20101228151738-mmm1gug4t2hesron
2010-12-28 16:17:38 +01:00
Fabien Pinckaers b81d5967ff fix
bzr revid: fp@tinyerp.com-20101228145442-9ktaid5cxqs43yej
2010-12-28 15:54:42 +01:00
François Degrave 8850bcb84b [FIX] dependencies in security groups
bzr revid: fde@openerp.com-20101228083043-6sfsuh4uvqvhu3ap
2010-12-28 09:30:43 +01:00
François Degrave 773cdea683 "[IMP] security groups on act_window in product and partner objects"
bzr revid: fde@openerp.com-20101220145607-vx2r937j9sj7e1zw
2010-12-20 15:56:07 +01:00
qdp-launchpad@tinyerp.com c613e19ac5 [FIX] pruchase: fixed access rights
bzr revid: qdp-launchpad@tinyerp.com-20101217164143-glfqx79n719079i3
2010-12-17 17:41:43 +01:00
qdp-launchpad@tinyerp.com ab8c38b279 [IMP] access rights improvements + small usability fixes
bzr revid: qdp-launchpad@tinyerp.com-20101214160729-lc1q0oy76dygh5s2
2010-12-14 17:07:29 +01:00
ksa (Open ERP) b629df8222 [IMP]: Add security rules
bzr revid: ksa@tinyerp.co.in-20101102055419-dxikwcij3n7xa9ko
2010-11-02 11:24:19 +05:30
ksa (Open ERP) 88c7e8e66c [IMP]: Add rights for purchase user and related with other user
bzr revid: ksa@tinyerp.co.in-20101101124537-7h3acibsx82thvej
2010-11-01 18:15:37 +05:30
Fabien Pinckaers 47e7b2c78f [IMP] Access rights and __openerp__ cleaning
bzr revid: fp@tinyerp.com-20101017213029-79yh7xvz06ii8dgo
2010-10-17 23:30:29 +02:00
Fabien Pinckaers bac3fe249a merg
bzr revid: fp@tinyerp.com-20101012093745-kpfyjls7h8ftczjm
2010-10-12 11:37:45 +02:00
Vir (Open ERP) 1b897be215 [MOD] purchase_* : Modification in access rights
bzr revid: vir@tinyerp.com-20100807063414-u5uhbdfwuijgxcv7
2010-08-07 12:04:14 +05:30
AMP (OpenERP) 6eb86abda3 [MOD] usability improvement in access rights
bzr revid: amp@tinyerp.com-20100723072243-kpex4cdgckhga46d
2010-07-23 12:52:43 +05:30
Fabien Pinckaers a1e503f869 merge
bzr revid: fp@tinyerp.com-20100708144347-b9x0lx1ulfbjtli4
2010-07-08 16:43:47 +02:00
Fabien Pinckaers 2c71227203 improvements_view
bzr revid: fp@tinyerp.com-20100629120926-9c7qdw0mug279ehh
2010-06-29 14:09:26 +02:00
UCO (OpenERP) 3217cf7e4c [REM]: Removed access rules for OSV memory objects
bzr revid: rpa@tinyerp.com-20100628134938-23kiccr4355jfhmg
2010-06-28 19:19:38 +05:30
nel@tinyerp.com 953e7dc67d [IMP] stock views
bzr revid: nel@tinyerp.com-20100616132609-abqesd6tm8axcokx
2010-06-16 15:26:09 +02:00
Fabien Pinckaers 8baf16f25e [IMP] access rights. Remove bad stuff on point of sale
bzr revid: fp@tinyerp.com-20100612162154-f9dgju8wsmn79gq0
2010-06-12 18:21:54 +02:00
Fabien Pinckaers 43ccf2f774 fix
bzr revid: fp@tinyerp.com-20100611142631-8njuqup1ugudbb3w
2010-06-11 16:26:31 +02:00
Rvo(Open ERP) f6188dbf2e [MERGE] access rights: addition of some missing access rights for both osv and osv_memory. to be continued
bzr revid: odo@openerp.com-20100519164111-9n8vrpz4lfmml8an
2010-05-19 18:41:11 +02:00