Commit Graph

1808 Commits

Author SHA1 Message Date
Alexandre Janniaux
9fe9eee18a FIX|Fix some minor issues on Reception and add a new test for it (#26310)
* reception: reOpen: mirror $this->statut in $this->status

$this->statut is the deprecated variable, $this->status should also get
the correct value.

* reception: setDraft: mirror $this->statut in $this->status

$this->statut is the deprecated variable, $this->status should also get
the correct value.

* reception: add missing $weight field

Fix warning:

    Undefined property: Reception::$weight

* societe: add country_id field

* reception: use getDolGlobalInt when suitable

Using empty() implies that the value actually exists on the stdClass at
$conf->global, but it's not always the case. getDolGlobalInt will handle
this smoothly by checking first, which solves warnings like those:

    Undefined property: stdClass::$STOCK_CALCULATE_ON_RECEPTION

* ReceptionTest: add new test

The test checks the usual workflow of the Reception class, with, on the
one hand, the common CRUD operations:
 - create
 - fetch
 - update
 - delete

And on the other hand, the status handling for Reception:
 - valid: STATUS_DRAFT -> STATUS_VALID
 - setClosed: STATUS_VALID -> STATUS_CLOSED
 - reOpen: STATUS_CLOSED -> STATUS_VALID
 - setDraft: STATUS_VALID -> STATUS_DRAFT

The stocks lines are not tested yet, and the error cases, like any other
transition not described above, are not tested either. The permissions
for some of the operations are hardcoded for the test and there is no
failure check when the permission is not set yet.
2023-10-21 16:28:30 +02:00
Laurent Destailleur
7a694d3485 Fix phpunit 2023-10-20 03:59:02 +02:00
Laurent Destailleur
9a8db612b3 Fix phpunit error 2023-10-17 15:48:38 +02:00
Laurent Destailleur
c1b74f9338 Fix phpunit regression 2023-09-29 17:04:11 +02:00
Laurent Destailleur
72e17fe60e Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2023-09-29 16:53:54 +02:00
Laurent Destailleur
b21a24aa97 Add AssetModel in AllTest 2023-09-26 20:52:49 +02:00
Hystepik
d157e8f660 New asset model phpunit test 2023-09-25 14:54:32 +02:00
Laurent Destailleur
557fe235d1 Fix warnings 2023-09-10 19:41:14 +02:00
Laurent Destailleur
b2ae9ea888 Fix warnings 2023-09-10 15:23:32 +02:00
Laurent Destailleur
ad9e11542c Fix phpunit warning 2023-09-10 15:16:46 +02:00
Laurent Destailleur
bc71380410 Fix sql errors 2023-09-09 21:16:58 +02:00
Laurent Destailleur
fb5f4c1dc2 NEW Add phpunit for REST API of contacts 2023-09-08 21:12:59 +02:00
Laurent Destailleur
33288ee66a Try to fix phpunit on dol_eval 2023-09-08 19:10:44 +02:00
Laurent Destailleur
6dbd7e35f2 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2023-09-08 14:17:17 +02:00
Laurent Destailleur
c379420d86 Fix regression in dol_eval 2023-09-08 14:12:12 +02:00
Laurent Destailleur
d91ce60ab4 Merge pull request #25819 from frederic34/setascustomer
deprecate set_as_client
2023-09-08 11:23:06 +02:00
Laurent Destailleur
e9787451a8 Disallow more use of parenthesis into dol_eval 2023-09-08 05:51:06 +02:00
Frédéric FRANCE
26dff90658 deprecate set_as_client 2023-09-06 14:38:35 +02:00
Laurent Destailleur
150de687bf Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into develop 2023-09-05 20:13:38 +02:00
Laurent Destailleur
0ed6a63fb0 FIX #CVE-2023-4197 2023-09-05 00:49:01 +02:00
Laurent Destailleur
552a079379 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into develop 2023-08-27 16:05:46 +02:00
Laurent Destailleur
45d323a6f8 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2023-08-27 16:02:57 +02:00
Laurent Destailleur
4302a6bc04 Fix empty on getDolGlobal 2023-08-27 15:55:44 +02:00
Laurent Destailleur
c0e2d55549 Fix warnings 2023-08-26 00:43:51 +02:00
Laurent Destailleur
1293f48018 Fix phpunit 2023-08-26 00:05:58 +02:00
Laurent Destailleur
a0455c72a3 Test phpunit 2023-08-25 23:44:55 +02:00
Laurent Destailleur
a296751543 Fix phpunit 2023-08-25 22:04:37 +02:00
Laurent Destailleur
4c2645147c Fix phpunit API warnings 2023-08-25 15:52:31 +02:00
Laurent Destailleur
7e062f9391 Fix phpunit API warnings 2023-08-25 15:49:09 +02:00
Laurent Destailleur
c6a30bcf9e Fix phpunit 2023-08-25 15:45:12 +02:00
Laurent Destailleur
256fe9ecf8 Add more REST phpunit tests 2023-08-25 14:48:41 +02:00
Laurent Destailleur
bcd3401e47 Fix phpunit 2023-08-25 13:58:27 +02:00
oussamanhairech
572192a01f #14295 Rest API Contact test 2023-08-24 18:21:06 +02:00
Laurent Destailleur
e1dbeb58ea Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into develop 2023-08-13 16:35:08 +02:00
Laurent Destailleur
310ef11dac FIX WAF 2023-08-13 15:45:45 +02:00
Laurent Destailleur
b3f8795414 Fix phpunit 2023-08-12 01:08:04 +02:00
Laurent Destailleur
c9f1ee08dc Fix phpunit 2023-08-11 20:15:01 +02:00
Laurent Destailleur
df4761e42a Fix numbering of shipments 2023-08-11 12:14:28 +02:00
Laurent Destailleur
1aa535e994 Fix regressions 2023-08-06 01:41:53 +02:00
Laurent Destailleur
216ab4c190 Fix phpunit 2023-08-04 17:26:38 +02:00
Laurent Destailleur
b6a061f795 Debug v18 - warnings and pgsql migration 2023-06-26 23:02:17 +02:00
Laurent Destailleur
6cb360449c Try to fix pgsql migration 2023-06-26 19:31:31 +02:00
Laurent Destailleur
243f5681dd Fix phpunit 2023-06-22 22:18:41 +02:00
Laurent Destailleur
42f963ad48 Fix phpunit 2023-06-22 22:12:55 +02:00
Laurent Destailleur
c07de0f300 Fix phpunit 2023-06-22 21:38:12 +02:00
Laurent Destailleur
833c798bf5 Test CI 2023-06-19 20:23:09 +02:00
Laurent Destailleur
74fa309b80 Fix CI 2023-06-19 20:07:46 +02:00
Laurent Destailleur
2a4cdad5cf Fix phpunit 2023-06-19 20:05:54 +02:00
Laurent Destailleur
927768ea98 Fix phpunit 2023-06-19 19:34:57 +02:00
Laurent Destailleur
415ce5c8fc Fix phpunit 2023-06-19 18:55:49 +02:00