Commit Graph
564 Commits
Author SHA1 Message Date
Martin Trigaux 90d85eb9c5 [I18N] export saas-13.5 source terms
Without demo data

closes odoo/odoo#56869

X-original-commit: 33f251b6489455cd7221f2c62dee0400a69784b8
Related: odoo/enterprise#12836
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-09-01 11:18:00 +00:00
Thibault Delavallée 1404af789c [REF] various: use helper to create tests users
PURPOSE

Lessen use of mail-specific calls and variables

SPECIFICATIONS

Use mail_new_test_user tool in tests, lessening use of mail-specific context
keys in tests.

LINKS

Task ID-2326281 (context keys use cleaning)
PR odoo/odoo#56631
PR odoo/enterprise#12707

X-original-commit: 910559c092dc7dfa00b91339a5423e16cd4668e1
2020-08-28 07:59:23 +00:00
Tiffany Chang (tic) 0aa0984f83 [IMP] product_expiry: Position product Expiration Dates better
This commit makes it so the 'expiry_and_lots' settings in the product
form appear underneath the corresponding checkbox that makes them
visible. Previously it was appearing in the column before the checkbox
and moving other form fields in a non-intuitive way.
2020-07-03 11:54:08 +00:00
Tiffany Chang (tic) 5ebf1f5dbe [IMP] product_expiry: Add delivery slip expiration dates
This commit adds the option to have lot/serial number expiration
dates be included in a delivery report (via settings). This is only
applicable for stock.picking where 'State=Done', when 1 or more
lot/serial numbers are used, and 1 or more lot/serial number expiration
dates exist.

This completes subsection 4 of overall Improve delivery slip task.

Task: 2039720
2020-07-03 11:54:08 +00:00
Martin Trigaux 400cc4f14e [FIX] *: correct all or improve code translation lookup
This commit fixes all issues detected by the new pylint
gettext-variable test.
It converts some calls to the new syntax
  _("Foo %s", bar)

to progressively migrate the code to the new syntax.

A few calls were not technically incorrect but still detected by the
linter.

  _("Foo" +
    "Bar")

has been converted to

  _("Foo"
    "Bar")

as it has the same effect and make sure the argument is of type
asteroid.Const instead of BinOp).

closes odoo/odoo#53683

Related: odoo/enterprise#11467
Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
2020-06-30 10:19:59 +00:00
Pratima Gupta d8702a4419 [FIX] product_expiry: changed removal date visibility on inventory report
1) removal_date in inventory report should be readonly if
product tracking is none or use_expiration_date of product
is false.

2) removal_date should be editable in inventory mode.

Fixes-2273732

closes odoo/odoo#52827

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-06-17 09:56:29 +00:00
Pratima Gupta 835dac49c3 [IMP] *: update list view
This commit adapts several views to make them use newly defined
widgets, the new decoration-xxx mechanism on fields, and to adapt
them to the new design of buttons.

used following widgets and designs -

1) decoration-bf
2) many2one_avatar_user widget
3) badge widget

Task-2248231

closes odoo/odoo#51074

Related: odoo/enterprise#10528
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-05-20 12:08:49 +00:00
svs-odoo 4ec07602aa [FIX] product_expiry: update quantity on hand
Before this commit, when the user tries to create a new quant, even if
the product doesn't use an expiration date, he/she will not be able to
create the quant.
The issue was as `removal_date` field is added by `product_expiry` in
the quant list view, the field is on the values used to create a new
quant but not in the list of accepted field for quant creation.
So, it raises an UserError.

task-2260085

closes odoo/odoo#51482

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-05-18 15:35:08 +00:00
yhu-odoo 86f091c0c6 [IMP]stock,product_expiry: improve error message for sn number check
=======
PURPOSE
=======

Improve duplicated serial number message to show more information.

=======
SPEC
=======

In this commit, we show full information about all invalide product name
and lot/sn number when the user enters duplicated ones.

- Change the sql constraint for checking duplicate sn/lot to python
constraint to support customised error message.
- Create lot in batch to show all invalide ones in error message.

=======
LINKS
=======

task 2083605
pr #44366

Related: odoo/upgrade#954
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-03-17 12:40:26 +00: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
Martin Trigaux 0cc8610923 [I18N] export saas-12.3 source terms
closes odoo/odoo#45285

X-original-commit: bb281e98f52a2716f00d43a07446a08df698c1dd
Related: odoo/enterprise#8413
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2020-02-13 11:45:39 +00:00
Martin Trigaux 65530dfd6a [ADD] *: add ir.model.access on all transient models
Following changes needing ir.model.access on transient models too.
Remove groups declaration on the action to move it to ir.model.access
when possible.
Rules are strict by default with no unlink access by default and high
priviledge asked. Adaptations may be needed later.
Write access is given as a wizard may need to be modified in case the
action triggers an error and the user has to correct a value

account*: use account.group_account_user for all transient by default
	  remove account.print.journal relic
stock*: use stock.group_stock_user by default
survey: survey user can send invitations
mail: allow any employee to execute wizards
      additional verifications are made to ensure they are executed
      only on the documents the user has access to you
      give portal access to mail.compose.message as portal still does
      some actions like posting messages on the forum
      add ir.rule to avoid reading somebody else messages
      increase the query count because of undeterminist count
crm: saleman for lead2opp, manager for massmailing
     partner manager for actions linked to partners
     avoid a write in test_lead_lost
sms: any employee can send sms
mrp: mrp user can execute wizards
     give unlink access as making write during do_produce operation
base_import: employees can import files
delivery: stock user can deliver
event_sale: sale user can configure the wizards
	    event user inherit from  sale rights
gamification: employee can give badge
google_service: resolve FIXME
hr: add specific rights
    manager can set a plan according to group on button
    anyone who can write on an employee can register a departure
hr_expense: set rights based on buttons
hr_holidays: an approver can make a summary report
hr_recruitment: recruiter can refuse a candidate
hr_timesheet: can use the wizard if can create a timesheet
l10n_eu_service: managers can create fiscal positions
mass_mailing: same group as on mass.mailing.list
membership: accountant can create invoice from membership
payment: accountant can create a link
	 as the source is an account.move
	 keep the payment.acquirer.onboarding.wizard to system user
	 only as it is called during company configuration
point_of_sale: PoS manager only can use wizards
	       never create closing_balance_confirm_wizard records
product_expiry: stock user has rights on stock.picking
product_margin: access from accounting menus
repair: same rules as for above models
sale: set ir.rule for self wizard only
      add rule from model introduced in payment to add salesman group
sale_crm: saleman can create a quotation from a lead
sale_coupon: any saleman can generate coupon
	     add self ir.rule
sale_product_configurator: salesman can select product variants
snailmail: employee can send letters
website: designers can write on website
website_crm_partner_assign: same rule as group on action
website_sale: sale ACL as for payment.acquirer.onboarding.wizard
website_slides: anyone can send invitation

base: base.language.*: allow employee (cf lang_install)
      change.password.user: can not read change password wizard of
      other users
      test.*: no access is needed

Courtesy of Damien Bouvy, William Andre and Antoine Prieëls for review
of acl
2020-02-04 17:54:18 +01:00
Simon Lejeune b9334c53b8 [REF] stock: move line: some guidelines
- move all the constrains at the same place, make sure they are private
- move all the onchanges at the same place, make sure they are private
- move `_get_similar_move_lines` helper at the bottom of the file with
  the other helpers
2020-01-20 14:01:21 +00:00
svs-odoo 5f62ec0b5c [FIX] product_expiry: default expiration_date
Before this commit, the default `expiration_date` wasn't set when the
move line was created with the help of multiple assign serial numbers
button or when user wrote/copy-pasted a list of SN/LN.

task-2166230

closes odoo/odoo#42809

X-original-commit: ff6126e8077031fb20eada5f3f9d8fd8a4a4c56a
Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2020-01-06 19:46:05 +00:00
svs-odoo d67b1471a3 [FIX] product_expiry: editable expiration_date
Before this commit, in the move line view, the  field `expiration_date`
was readonly even when it must be editable. It was because the condition
who defines if the field is readonly or not was wrong.
Also, removed the field `expiration_date_readonly` as it mainly referred
to `picking_type_use_existing_lots`, and use this latter instead.

task-2166230

X-original-commit: f1b8426919dc049df447d50ed3ac365eec2897c3
2020-01-06 19:46:04 +00:00
Yenthe666 7876af3ad0 [IMP] *: set name on page elements
page is an element that is often used for xpath

closes odoo/odoo#41718

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-12-16 15:10:24 +00:00
Martin Trigaux b5db1c61ee [I18N] *: export saas-13.1 source terms
Without demo data, for the odoo-master transifex project

closes odoo/odoo#41935

X-original-commit: dab7670b73506fb3a835695ee3bd735e0c5e5c2b
Related: odoo/enterprise#7287
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-12-16 12:49:55 +00:00
Martin Trigaux b7d91ba25b [I18N] *: remove es_AR translations
Followup of a425695e
The terms were back in 12.0
Courtesy of Juan José Scarafía

closes odoo/odoo#41624

X-original-commit: 85d0c7001a997748d7691205bbb8d066597591a5
Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-12-10 10:00:18 +00:00
Kevin Baptiste 6cbe824871 [REV] web: reverts update to fontawesome 5.11.2
This reverts commit ff1c35513a.

closes odoo/odoo#41480

X-original-commit: 116057b26e71db4692280463669f3e80d813ddcc
Related: odoo/enterprise#7110
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-12-09 10:33:36 +00:00
Kevin Baptiste ff1c35513a [IMP] web: update to fontawesome 4.7.0 to 5.11.2
FontAwesome 5 introduced new names for some icons as described on
https://fontawesome.com/how-to-use/on-the-web/setup/upgrading-from-version-4#name-changes

This commit replaces the old names to the new ones.

closes odoo/odoo#35826

Taskid: 2050241
Related: odoo/enterprise#5180
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
2019-11-28 10:05:12 +00:00
Hetashree ChauhanandHiral Bhavsar 4c36a35bf1 [IMP] sale(_stock): add wizard to cancel the confirmed SO
Purpose of the task is be able to cancel an order if the products have
been delivered or if an invoice has already been confirmed

-the remaining pickings (back orders) should be cancelled.
-the draft invoices should be cancelled too.

[IMP] product_expiry: compute method should iterate on self

task-1919761
Closes #29920

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
Co-authored-by: Hiral Bhavsar <hbh@odoo.com>
2019-11-06 13:19:40 +00:00
svs-odoo 4d71fe100d [FIX] product_expiry: expiration date on receipt
How to reproduce:
    - Create a tracked product using expiration dates and don't set the
      `expiration_time` field;
    - Create a receipt for this product (using "Create New Lots/Serial
      Numbers") and confirm it;
    - Create a move line for this product and define an expiration date;
    - Valid the picking -> Traceback.

The issue was as `expiration_time` isn't set on product, the production
lot created on the receipt's validation don't have an `expiration_date`.
So, if the `expiration_date` is set on the receipt move line, the
production lot will try to get a time delta with its unset
`expiration_date`, causing the traceback.

task-2119330

closes odoo/odoo#39795

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-11-05 12:06:37 +00:00
svs-odoo e5d3f2a1ab [IMP] product_expiry: hide removal date on quant
When user goes on product's quants, hides the "Removal Date" field if
the product doesn't use expiration dates.
Also, set it as optional to be hide if the user wants.

closes odoo/odoo#39425

Signed-off-by: Arnold Moyaux <amoyaux@users.noreply.github.com>
2019-10-28 12:31:58 +00:00
svs-odoo b95651f681 [FIX] product_expiry: quant expiry search filter
Before this commit, the "Expiration Alerts" search filter for quant
return a traceback because it tries to render hours/minutes/seconds but
there aren't supported. This fix just removes them.

closes odoo/odoo#39416

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-10-28 08:59:34 +00:00
svs-odoo 7d7b902eac [IMP] product_expiry: change expiry alert compute
The production lot expiry alert was based on the field `alert_date`.
Now, it will be based on the field `life_date` since if user set only
one field, there is more chance this field will be filled but the field
`alert_date` will not.

Task #1938656
2019-10-25 13:50:37 +00:00
svs-odoo adbfb968da [IMP] product_expiry: add expiry date in lot ZPL
Adds "Best before date" and "Expiration Date" on LN/SN ZPL print format.

Task #1938656
2019-10-25 13:50:37 +00:00
svs-odoo 197ef3ea68 [IMP] product_expiry: expired wizard confirmation
When user tries to validate a picking with expired production lot,
displays a wizard for the confirmation popup. This wizard shows which
lots are expired.

Task #1938656
2019-10-25 13:50:37 +00:00
svs-odoo f30b17b0cd [IMP] product_expiry,stock: expiry date in lot report
Adds "Best before date" and "Expiration Date" on LN/SN pdf report.

Task #1938656
2019-10-25 13:50:36 +00:00
svs-odoo decef03acf [IMP] product_expiry,stock: expiration_date at receipt
User can now define the lot's field `expiration_date` when he/she
receipts a tracked product using the expiration dates.

Task #1938656
2019-10-25 13:50:36 +00:00
svs-odoo 69957aec9b [IMP] product_expiry: add expiration search filter
Adds a search filter on quant list for expired lot.

Task #1938656
2019-10-25 13:36:47 +00:00
svs-odoo 8cec00f90d [IMP] product_expiry: add removal_date on quant list
Sets quant lines in red if removal date has been exceeded.

Task #1938656
2019-10-25 13:36:47 +00:00
svs-odoo 9559bf90a8 [IMP] product_expiry: onchange on production_lot dates
Computes production_lot date fields when the user manually changes the
`life_date` field.

Task #1938656
2019-10-25 13:36:47 +00:00
svs-odoo ca06bfaf4f [IMP] product_expiry: visual changes
Changes the label and tooltip of expiration date related fields.

Task #1938656
2019-10-25 13:20:38 +00:00
svs-odoo 287f56c5c9 [IMP] product_expiry: add use_expiration_date
Adds new product field, `use_expiration_date`, to know if user wants to
use expiration date on product. Only accessible when product is tracked.

Also, changes fields' name:
    - product.template:     life_time becomes expiration_time
    - stock.production.lot: life_date becomes expiration_date

Task #1938656
2019-10-25 13:20:38 +00:00
Arnaud Baes 0c6488a95a [REF] stock: Set action_done on pickings private
`action_done`on pickings should be a private method,
and called only trough the picking validation process.

task-1938108

closes odoo/odoo#39174

Signed-off-by: Simon Lejeune (sle) <sle@openerp.com>
2019-10-23 07:43:01 +00:00
Odoo Translation Bot b6e7ed6c7b [I18N] Update translation terms from Transifex 2019-10-07 09:11:11 +02:00
Odoo Translation Bot 40deff7cbe [I18N] Update translation terms from Transifex 2019-10-01 21:21:46 +02:00
Odoo Translation Bot d7b8831ea8 [I18N] Update translation terms from Transifex 2019-09-29 01:22:33 +02:00
Victor Feyens 07631a5185 [IMP] * : manifest module categories cleanup
closes odoo/odoo#35754

Signed-off-by: Damien Bouvy (dbo) <dbo@odoo.com>
2019-09-25 14:03:45 +00:00
Odoo Translation Bot 974261f7e9 [I18N] Update translation terms from Transifex 2019-09-22 01:19:57 +02:00
Odoo Translation Bot e80b81dca1 [I18N] Update translation terms from Transifex 2019-09-15 01:30:37 +02:00
Martin Trigaux 68c753af55 [I18N] *: export saas-12.5 source terms
Still without demo data

closes odoo/odoo#36559

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-09-10 08:58:33 +00:00
Simon Lejeune 0f3b3e4afd [REF] product_expiry: multi company
Adapt the module to the multicompany changes.

task-1985992
2019-09-03 15:05:04 +00:00
svs-odoo 63852bc1a1 [FIX] product_expiry: add space before "days"
In the product form view, add a space before the "days" word to avoid to
have the value sticked to days.

Task #2058665
2019-09-03 13:31:22 +00:00
Odoo Translation Bot 86809804f9 [I18N] Update translation terms from Transifex 2019-09-01 01:28:13 +02:00
Martin Trigaux b247aa3252 [I18N] *: export saas-12.5 source terms
That will be used a the basis for the future 13.0 version
Without demo data

closes odoo/odoo#36057

Signed-off-by: Martin Trigaux (mat) <mat@odoo.com>
2019-08-26 09:38:09 +00:00
Raphael Collet 9920f20e4c [IMP] models: ORM speedup
This branch is the combination of several optimizations in the ORM:

* store field values once in the cache: the cache reflects more
faithfully the database, only fields that explicitly depend on the
context have an extra indirection in the cache;

* delay recomputations by default: use method `recompute` to explicitly
flush out pending recomputations;

* delay updates in method `write`: updates are stored in a data
structure that can be flushed efficiently to the database with method
`flush` (which also flush out recomputations);

* make method `modified` take advantage of inverse fields to inverse
dependencies;

* filter records by evaluating a domain on records in Python;

* a computed field with `readonly=False` behaves like a normal field
with an onchange method;

* computed fields are computed in superuser mode by default.

Work done by Toufik Ben Jaa, Raphael Collet, Denis Ledoux and Fabien
Pinckaers.

closes odoo/odoo#35659

Signed-off-by: Denis Ledoux <beledouxdenis@users.noreply.github.com>
2019-08-20 12:43:59 +00:00
Arnaud Baes 689dab3f26 [IMP] stock,product_expiry: lot views cleanup 2019-08-14 12:27:05 +00:00
Christophe Simonis 140ee6b8f0 [MERGE] forward port branch saas-12.4 up to 98a55917a6 2019-08-14 16:48:10 +02:00
Martin Trigaux 8be6470a82 [I18N] *: export saas-12.4 source terms 2019-08-13 11:53:38 +02:00