Skip to content

Commit 0839136

Browse files
committed
Merge remote-tracking branch 'remotes/dev/1.10' into 1.10
2 parents 21b68fc + bcd32ed commit 0839136

File tree

8 files changed

+61
-26
lines changed

8 files changed

+61
-26
lines changed

Diff for: src/OroCRM/Bundle/AccountBundle/Resources/config/datagrid.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ datagrid:
5252
contactPhone:
5353
data_name: a.defaultContact
5454
options:
55-
entityHint: account
55+
entityHint: accounts
5656
toolbarOptions:
5757
hide: true
5858
pageSize:
@@ -225,7 +225,7 @@ datagrid:
225225
entity_name: %orocrm_account.account.entity.class%
226226
data_identifier: a.id
227227
options:
228-
entityHint: account
228+
entityHint: accounts
229229
export: true
230230
entity_pagination: true
231231
views_list: '@orocrm_account.accounts_view_list'
@@ -276,7 +276,7 @@ datagrid:
276276
default:
277277
lastName: ASC
278278
options:
279-
entityHint: contact
279+
entityHint: contacts
280280

281281
account-contacts-update-grid:
282282
extends: base-account-contacts-grid
@@ -454,7 +454,7 @@ datagrid:
454454
data_name: a.owner
455455
className: 'Oro\Bundle\OrganizationBundle\Entity\BusinessUnit'
456456
options:
457-
entityHint: account
457+
entityHint: accounts
458458

459459
accounts-for-context-grid:
460460
extended_entity_name: %orocrm_account.account.entity.class%
@@ -540,7 +540,7 @@ datagrid:
540540
property: fullName
541541
translatable_options: false
542542
options:
543-
entityHint: account
543+
entityHint: accounts
544544
entity_pagination: true
545545
toolbarOptions:
546546
pageSize:

Diff for: src/OroCRM/Bundle/ContactBundle/Resources/config/datagrid.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ datagrid:
4141
label: orocrm.contact.contactphone.phone.label
4242
frontend_type: phone
4343
options:
44-
entityHint: contact
44+
entityHint: contacts
4545
toolbarOptions:
4646
hide: true
4747
pageSize:
@@ -96,7 +96,7 @@ datagrid:
9696
icon: trash
9797
link: delete_link
9898
options:
99-
entityHint: group
99+
entityHint: groups
100100
entity_pagination: true
101101

102102
# contacts assigned to group, shown on orocrm_contact_group_update route
@@ -155,7 +155,7 @@ datagrid:
155155
data_name: c.lastName
156156
default: { hasGroup: %oro_datagrid.extension.orm_sorter.class%::DIRECTION_DESC }
157157
options:
158-
entityHint: contact
158+
entityHint: contacts
159159
rowSelection:
160160
dataField: id
161161
columnName: hasGroup
@@ -549,7 +549,7 @@ datagrid:
549549
entity_name: %orocrm_contact.entity.class%
550550
data_identifier: c.id
551551
options:
552-
entityHint: contact
552+
entityHint: contacts
553553
export: true
554554
entity_pagination: true
555555
views_list: '@orocrm_contact.contacts_view_list'
@@ -668,7 +668,7 @@ datagrid:
668668
properties:
669669
id: ~
670670
options:
671-
entityHint: account
671+
entityHint: accounts
672672
rowSelection:
673673
dataField: id
674674
columnName: hasContact
@@ -788,7 +788,7 @@ datagrid:
788788
properties:
789789
id: ~
790790
options:
791-
entityHint: contact
791+
entityHint: contacts
792792

793793
# contacts grid for context
794794
contacts-for-context-grid:
@@ -898,7 +898,7 @@ datagrid:
898898
data_name: addressPostalCode
899899
enabled: false
900900
options:
901-
entityHint: contact
901+
entityHint: contacts
902902
entity_pagination: true
903903
toolbarOptions:
904904
pageSize:

Diff for: src/OroCRM/Bundle/ContactUsBundle/Resources/config/datagrid.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -109,5 +109,5 @@ datagrid:
109109
icon: trash
110110
link: delete_link
111111
options:
112-
entityHint: contact request
112+
entityHint: contact requests
113113
entity_pagination: true

Diff for: src/OroCRM/Bundle/MagentoBundle/Entity/Order.php

+1
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ class Order extends ExtendOrder implements
196196

197197
/**
198198
* @ORM\ManyToOne(targetEntity="Cart")
199+
* @ORM\JoinColumn(onDelete="CASCADE")
199200
*/
200201
protected $cart;
201202

Diff for: src/OroCRM/Bundle/MagentoBundle/Migrations/Schema/OroCRMMagentoBundleInstaller.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public function setVisitEventAssociationExtension(VisitEventAssociationExtension
110110
*/
111111
public function getMigrationVersion()
112112
{
113-
return 'v1_41_4';
113+
return 'v1_41_5';
114114
}
115115

116116
/**
@@ -911,7 +911,7 @@ protected function addOrocrmMagentoOrderForeignKeys(Schema $schema)
911911
$schema->getTable('orocrm_magento_cart'),
912912
['cart_id'],
913913
['id'],
914-
[]
914+
['onDelete' => 'CASCADE']
915915
);
916916
$table->addForeignKeyConstraint(
917917
$schema->getTable('oro_workflow_item'),
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
3+
namespace Oro\Bundle\MagentoBundle\Migrations\Schema\v1_41_5;
4+
5+
use Doctrine\DBAL\Schema\Schema;
6+
7+
use Oro\Bundle\MigrationBundle\Migration\Migration;
8+
use Oro\Bundle\MigrationBundle\Migration\QueryBag;
9+
10+
class SetCascadeDeleteToOrderCartFK implements Migration
11+
{
12+
/**
13+
* {@inheritdoc}
14+
*/
15+
public function up(Schema $schema, QueryBag $queries)
16+
{
17+
$table = $schema->getTable('orocrm_magento_order');
18+
$fkName = 'FK_4D09F3051AD5CDBF';
19+
$fk = $table->getForeignKey($fkName);
20+
if ($fk->getOption('onDelete') !== 'CASCADE') {
21+
$table->removeForeignKey($fkName);
22+
$table->addForeignKeyConstraint(
23+
$schema->getTable('orocrm_magento_cart'),
24+
['cart_id'],
25+
['id'],
26+
['onDelete' => 'CASCADE']
27+
);
28+
}
29+
}
30+
}

Diff for: src/OroCRM/Bundle/MagentoBundle/Resources/config/datagrid.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ datagrid:
191191

192192
action_configuration: [ "@orocrm_magento.datagrid.customer_actions_provider", "getCustomerActionsPermissions"]
193193
options:
194-
entityHint: customer
194+
entityHint: customers
195195
export: true
196196
entity_pagination: true
197197

@@ -373,7 +373,7 @@ datagrid:
373373
acl_resource: orocrm_magento_cart_view
374374
rowAction: true
375375
options:
376-
entityHint: cart
376+
entityHint: carts
377377
export: true
378378
entity_pagination: true
379379
views_list : '@orocrm_magento.datagrid.cart_view_list'
@@ -428,7 +428,7 @@ datagrid:
428428
default:
429429
createdAt: DESC
430430
options:
431-
entityHint: cart item
431+
entityHint: cart items
432432
toolbarOptions:
433433
hide: true
434434
pagination:
@@ -647,7 +647,7 @@ datagrid:
647647
acl_resource: orocrm_magento_product_view
648648
rowAction: true
649649
options:
650-
entityHint: magento product
650+
entityHint: magento products
651651

652652
magento-order-grid:
653653
extended_entity_name: OroCRM\Bundle\MagentoBundle\Entity\Order
@@ -857,7 +857,7 @@ datagrid:
857857
acl_resource: orocrm_magento_order_view
858858
rowAction: true
859859
options:
860-
entityHint: order
860+
entityHint: orders
861861
export: true
862862
entity_pagination: true
863863

@@ -956,7 +956,7 @@ datagrid:
956956
taxAmount: { data_name: oi.taxAmount }
957957
rowTotal: { data_name: oi.rowTotal }
958958
options:
959-
entityHint: order item
959+
entityHint: order items
960960
toolbarOptions:
961961
hide: true
962962
pagination:
@@ -1579,7 +1579,7 @@ datagrid:
15791579
error: orocrm.magento.newslettersubscriber.action.error.unsubscribe
15801580
action_configuration: [ "@orocrm_magento.datagrid.newsletter_subscriber_provider", "getActionsPermissions"]
15811581
options:
1582-
entityHint: newsletter subscriber
1582+
entityHint: newsletter subscribers
15831583
export: true
15841584
entity_pagination: true
15851585

@@ -1662,7 +1662,7 @@ datagrid:
16621662
type: string
16631663
data_name: c.email
16641664
options:
1665-
entityHint: customer
1665+
entityHint: customers
16661666
entity_pagination: true
16671667
toolbarOptions:
16681668
pageSize:
@@ -1825,7 +1825,7 @@ datagrid:
18251825
data_name: o.updatedAt
18261826
enabled: false
18271827
options:
1828-
entityHint: order
1828+
entityHint: orders
18291829
entity_pagination: true
18301830
toolbarOptions:
18311831
pageSize:
@@ -1968,7 +1968,7 @@ datagrid:
19681968
data_name: c.updatedAt
19691969
enabled: false
19701970
options:
1971-
entityHint: cart
1971+
entityHint: carts
19721972
entity_pagination: true
19731973
toolbarOptions:
19741974
pageSize:

Diff for: src/OroCRM/Bundle/MarketingListBundle/Form/Handler/MarketingListHandler.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,13 @@ protected function processSegment(MarketingList $marketingList)
129129
->setEntity($marketingList->getEntity())
130130
->setType($this->getSegmentTypeByMarketingListType($marketingList->getType()))
131131
->setDefinition($requestData['definition'])
132-
->setOwner($marketingList->getOwner()->getOwner())
133132
->setOrganization($marketingList->getOrganization());
134133

134+
$owner = $marketingList->getOwner()->getOwner();
135+
if (null !== $owner) {
136+
$segment->setOwner($owner);
137+
}
138+
135139
$marketingList->setSegment($segment);
136140
}
137141

0 commit comments

Comments
 (0)