Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX import missing fields on v12 #15590

Closed
wants to merge 5 commits into from

Conversation

StephaneLesage
Copy link
Contributor

Revert/Cherry-pick import commits from v13/develop apply to v12

StephaneLesage and others added 5 commits December 1, 2020 01:52
This reverts commit 40acd8a.
In order to apply other previous commits from develop, before reapplying it.
…ntact-region

NEW add region in export companies and contacts
…warehouse-usebatch

NEW: Products Import/Export 'default warehouse' and 'use batch' fields
…ty-mothercompany-debtlimit-bank-incoterms

NEW Third-Party Import new fields: mother company,outstanding debt limit,bank account,incoterms
@@ -262,6 +263,161 @@ public function __construct($db)
$this->export_sql_end[$r] .= ' WHERE c.fk_soc = s.rowid AND c.rowid = cd.fk_commande';
$this->export_sql_end[$r] .= ' AND c.entity IN ('.getEntity('commande').')';
if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' AND sc.fk_user = '.(empty($user) ? 0 : $user->id);
// Imports
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this is a new feature, it has been merged for v13 and will be added in v13 only.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this is a new feature, it has been merged for v13 and will be added in v13 only.

Hi,
do you mean everyhing or just propal/order/invoice ?
OK, so no new features on 12.0.x. Could it be pushed to a hypothetical 12.1 ?

Other fields were exported but just missing on import, so it's not really a new feature.
I modified the PR accordingly.

Copy link
Member

@eldy eldy Dec 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If 12.1 is 12 + new features, we can But we have just called it 13.0 :-)
If it is adding existing fields into table in same table, and not exported, we can say it is a bug.
If it changes the algorithm how we load data, or add secondary information, it is better in a new version.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If 12.1 is 12 + new features, we can But we have just called it 13.0 :-)

There is a 10.5 version, but it seems to be the only one like this. I thought minor improvements could be added also to minor revisions of major maintained versions. So OK in x.y.Z you actually don't use Y but only Z for bug fixes.
Then I looked to the history and found RoadMap and Release Process

@eldy eldy added the PR not qualified PR is not qualified (feature not enough requested, duplicate feature or other reason) label Dec 1, 2020
@StephaneLesage StephaneLesage changed the title FIX imports that were not merged on v12 FIX import missing fields Dec 1, 2020
@StephaneLesage StephaneLesage changed the title FIX import missing fields FIX import missing fields on v12 Dec 1, 2020
@@ -194,7 +194,7 @@ public function __construct($db)
);
if (is_object($mysoc) && $mysoc->useNPR()) $this->export_fields_array[$r]['p.recuperableonly'] = 'NPR';
if (!empty($conf->fournisseur->enabled) || !empty($conf->margin->enabled)) $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.cost_price'=>'CostPrice'));
if (!empty($conf->stock->enabled)) $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.stock'=>'Stock', 'p.seuil_stock_alerte'=>'StockLimit', 'p.desiredstock'=>'DesiredStock', 'p.pmp'=>'PMPValue'));
if (!empty($conf->stock->enabled)) $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('e.ref'=>'DefaultWarehouse', 'p.tobatch'=>'ManageLotSerial', 'p.stock'=>'Stock', 'p.seuil_stock_alerte'=>'StockLimit', 'p.desiredstock'=>'DesiredStock', 'p.pmp'=>'PMPValue'));
Copy link
Member

@eldy eldy Dec 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding the warehouse here will make the profile export to not being the profile to export product but to export stock into warehouse (you will get n lines for each warehouse).
There is another dedicated profile for that into modStock.
So i added the 'p.tobatch' field manually.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What ?
e.ref is warehouse name from llx_entrepot table, not the stock from llx_product_stock !
You already merged my PR on develop back in August (I didn't know develop was for v13 back then)
You make me doubt, so I tested it again on develop branch and it works fine:
image

@eldy eldy closed this in bc1dc1e Dec 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR not qualified PR is not qualified (feature not enough requested, duplicate feature or other reason)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants