Skip to content

[MIG][18.0] connector_prestashop - #187

Closed
flotho wants to merge 113 commits into
OCA:18.0from
MindAndGo:18.0-mig-connector-prestashop
Closed

[MIG][18.0] connector_prestashop#187
flotho wants to merge 113 commits into
OCA:18.0from
MindAndGo:18.0-mig-connector-prestashop

Conversation

@flotho

@flotho flotho commented Aug 18, 2025

Copy link
Copy Markdown
Member

Try to preserve history.
Start from #186
Thansk to @florian-dacosta and @cubells

Depends on :

sergio-teruel and others added 30 commits August 18, 2025 15:01
* [FIX] manufacturer export on template

  Export of manufacturer on template was broken due to a probable typo.
  `id_manufacturer` value was taken using `to_odoo` instead of `to_backend`.

* [IMP] filter of importable orders by state

  If `backend_record.importable_order_state_ids` is valued we check if current order is in the list.
  If not, the job fails gracefully.

* [FIX] combination image: do not default to `False` when missing
* [FIX] Fix export when no location has flag prestashop_synchronized

  When there is no location with the flag prestashop_synchronized in the
  location tree,

  Current behavior:

  The `location` key in the context is empty then the qty_available is
  computed for *every* locations/warehouses.

  Expected behavior:

  If there is at least one location flagged, use it, otherwise, use all
  the locations of the tree, starting from the selected location or
  selected warehouse location.

  When no location can be found (for instance because user selected a
  location with a usage different than 'internal'), then it should just
  fail and not return the stock of all warehouses.

  Being able to synchronize without activating 'prestashop_synchronized'
  is important: when used, this feature will trigger an export every time
  a quant is changed or created, on a large catalog, we might prefer only
  using the cron to have less frequent updates and less jobs.

  A second fix is that when a stock_location_id is set on the backend, it
  should be used, it was only used for the import of stock.

* [FIX] Exclude children from qty computation

  We already pass the children in 'location', if we don't disable
  'compute_child', the qty computation will try to get the children of
  each child and generates query of 1mio chars.

* [IMP] Group computation of qty_available

  Stats with 6700 products:

  Before: 570s
  After: 28s

* [FIX] Apply filter on locations for variants quantities

  It was only applied on export of template quantities.

* [IMP] Improve performance on prestashop qty recompute

  The add/union operation between recordsets is slow, aggregate the ids in
  a set and call the browse only once on the complete set is dramatically
  faster. See guewen/connector-magento#9
That may pass the prestashop id insted of the binding id to the exporter
That can cause the following problems:

* A job Error: Key (id_attribute_group)=(4) is not present in table "prestashop_product_combination_option"

* Wrong combination or combination values export or updated
* Combination or combination value never exported
* Faulty value in fields 'id_attribute_group' leading to data
  incoherence

(cherry picked from commit 767ba36)
* migrate components
* port backend buttons remove GenericAdapter
* remove unit_for fix key version
* start fixing order import
* Component usage
* [FIX] product views
* [FIX] remove prestashop decorator and various fixes
* Wrong imports
* Add debug Options
* Make mammping more generic
* Use new Component for importers
* Reference the Components for lates OCA/connector
* Fix python import
* [REF]Change the way shop_group are referenced
* [IMP] Add debug options + requirements
  (OCA#85)
* [REF]Rename views as the model name
* [REF]Migrate new components structure
* merge
* component usage
* product views
* remove prestshop decorator and various fixes
* Prevent unicode to be used as filter.
  particulary tru for the first import
* Add menus for finding intermediate object easily
* Better way to handle direct matching with components
* Add Fields for more options
  Redefine the Checkpoint method
* Add dependencies for stock fields
* Clean the add_checkpoint part
* Better Views and easier menus
* Error lines where not appended but pushed into a list
* Prevent duplication of useless delivery carrier
* Add options in stock field
* FIX duplicate key
* FIX bad adpter for testing connexion
* fix bad field for binding
* Implement the product matching functionnality
* Add active button
* Better defensive method on matching delivery carriers
* more logs
* Better sql constraint
* Prevent jobs to be executed on inactive backends
* Preserve unique mapping on delivery methods
* [IMP] migrate export of inventory, sale state and tracking number
* [IMP] fixes and add no_export field
* [FIX] listener
* [FIX] temprorary remove unfinished fonctionality
* [IMP] continue migration
* [FIX] various fixes
* [FIX] stock export
* Do not import product template stock into product variants
* Update combination quantity when variant stock changes
* Set variant images also for default combination
* Import supplier prices
* Do not duplicate payment modes for each language
* connector_prestashop: Do not set default product taxes if they are unset in Prestashop
Due to the total mess on commit history, I finally ended resolving merge conflicts
with automated tools and this is the final diff for letting things as they were.
* 🍏 flake8
* 🍏 pylint
* 🍏 tests
* ©️ Add me as contributor
* New versions of vcrpy has breaking changes, so we freeze it
* Adapt .travis.yml for proper runbot deployment
* Remove required on account.tax.group.company_id
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: connector-prestashop-10.0/connector-prestashop-10.0-connector_prestashop
Translate-URL: https://translation.odoo-community.org/projects/connector-prestashop-10-0/connector-prestashop-10-0-connector_prestashop/
Due to commit mangling, solving conflicts taking incoming change produces some desync
that is fixed here in this extra commit, although the attribution for these changes
is not correct, but it's the only way to get the exact content.
MPoch-PlanetaTIC and others added 22 commits August 18, 2025 15:01
* This is a combination of 7 commits.

[IMP] connector_prestashop: black, isort, prettie, python3 super syntax
[FIX,IMP] odoo 14.0 changes, remove two duplicated records
[IMP] connector_prestashop: change multi image dependency, have name in form
[FIX] connector_prestashop: missing attributes, local field name
[FIX] connector_prestashop: run all test
[IMP] connector_prestashop: black, isort, prettier
[IMP] connector_prestashop: backend default language, fix import
	message, assert tax of tax group, show queue job start, match address
	type
Also deal with sending email in the order_history version key
(cherry picked from commit b98bd50)
@omalbastin

Copy link
Copy Markdown

@flotho why do we need model/payment and model/payment_method? both link to account.payment.method.line

@flotho

flotho commented Dec 12, 2025

Copy link
Copy Markdown
Member Author

closed in favor of #189

@flotho flotho closed this Dec 12, 2025
@flotho

flotho commented Dec 12, 2025

Copy link
Copy Markdown
Member Author

@flotho why do we need model/payment and model/payment_method? both link to account.payment.method.line

You're right it as a proof of concept.
The following PR #189 is now better

@omalbastin

Copy link
Copy Markdown

@flotho I have commited my modules related connector_prestashop, connector_prestashop_calalog_manager, connector_prestashop_image, connector_prestashop_manufacturer etc for v18. There are lot of refactoring done that i belive it will be good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.