Commit c1f8332
John75SunCity
fix: Add sudo() for portal inventory counts and staging location creation
- Inventory counts route: Added sudo() for all model search_count calls
so portal users can see their container/file/document/temp/location counts
- Staging location creation: Added sudo() so portal users can create
customer.staging.location records
- Stock location model: Added sudo() to _create_or_update_stock_location
so the auto-created stock.location records work for portal users
Portal users don't have direct access to records.container, records.file,
records.document, temp.inventory, or stock.location models - they need
sudo() with proper domain filtering by partner_id for security.1 parent 41af572 commit c1f8332
File tree
2 files changed
+14
-13
lines changed- records_management
- controllers
- models
2 files changed
+14
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5425 | 5425 | | |
5426 | 5426 | | |
5427 | 5427 | | |
5428 | | - | |
5429 | | - | |
5430 | | - | |
5431 | | - | |
| 5428 | + | |
| 5429 | + | |
| 5430 | + | |
| 5431 | + | |
5432 | 5432 | | |
5433 | 5433 | | |
5434 | 5434 | | |
5435 | | - | |
| 5435 | + | |
5436 | 5436 | | |
5437 | 5437 | | |
5438 | 5438 | | |
5439 | | - | |
| 5439 | + | |
5440 | 5440 | | |
5441 | 5441 | | |
5442 | 5442 | | |
| |||
6586 | 6586 | | |
6587 | 6587 | | |
6588 | 6588 | | |
6589 | | - | |
6590 | | - | |
| 6589 | + | |
| 6590 | + | |
6591 | 6591 | | |
6592 | 6592 | | |
6593 | 6593 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
280 | | - | |
281 | | - | |
| 280 | + | |
| 281 | + | |
282 | 282 | | |
283 | | - | |
284 | | - | |
285 | | - | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
286 | 287 | | |
287 | 288 | | |
288 | 289 | | |
| |||
0 commit comments