2 of my observer are observing same sales_order_shipment_save_before
event. ModuleA
was the one i created first and then i created ModuleB
I think you are missing something. You can call as many functions as you can using observers for an event. But for each event, the observer's method name should be different, as well as its id.
<events>
<sales_order_shipment_save_before>
<observers>
<shipmentsave>
<type>singleton</type>
<class>shipmentsave/observer</class>
<method>salesOrderShipmentSaveBefore</method>
</shipmentsave>
</observers>
</sales_order_shipment_save_before>
</events>
<events>
<sales_order_shipment_save_before>
<observers>
<shipmentsave>
<type>singleton</type>
<class>bshipment/observer</class>
<method>salesOrderShipmentSaveBefore</method>
</shipmentsave>
</observers>
</sales_order_shipment_save_before>
</events>
You can see in the XML that the id shipmentsave
and method salesOrderShipmentSaveBefore
is the same.
Just change this and you are all done.
No time to test this, but at first glance I'd try making
<shipmentsave>
distinct for each module. Something like
<observers>
<shipmentsave>
<type>singleton</type>
<class>bshipment/observer</class>
<method>salesOrderShipmentSaveBefore</method>
</shipmentsave>
</observers>
and
<observers>
<bshipmentsave>
<type>singleton</type>
<class>bshipment/observer</class>
<method>salesOrderShipmentSaveBefore</method>
</bshipmentsave>
</observers>
Each observer should have a unique name. In the code both observer have the same name. So give unique name to each observer.